mirror of
https://github.com/tuxdotrs/tshell.git
synced 2026-09-19 18:49:02 +05:30
refactor(bar): modularize bar widgets and layout
This commit is contained in:
36
modules/bar/SystemTrayWidget.qml
Normal file
36
modules/bar/SystemTrayWidget.qml
Normal file
@@ -0,0 +1,36 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import QtQuick
|
||||
import Quickshell.Services.SystemTray
|
||||
import qs.config
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
|
||||
property int iconSize: 16
|
||||
|
||||
implicitWidth: trayRow.implicitWidth + 10
|
||||
implicitHeight: 34
|
||||
radius: Appearance.radius
|
||||
color: Appearance.colors.inActive
|
||||
visible: SystemTray.items.values.length > 0
|
||||
|
||||
Row {
|
||||
id: trayRow
|
||||
|
||||
anchors.centerIn: parent
|
||||
spacing: Appearance.spacing
|
||||
|
||||
Repeater {
|
||||
model: SystemTray.items.values
|
||||
|
||||
Image {
|
||||
required property var modelData
|
||||
|
||||
source: modelData.icon
|
||||
width: root.iconSize
|
||||
height: root.iconSize
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user