summaryrefslogtreecommitdiff
path: root/accounts/gkleen@sif/shell/quickshell/SystemTray.qml
diff options
context:
space:
mode:
Diffstat (limited to 'accounts/gkleen@sif/shell/quickshell/SystemTray.qml')
-rw-r--r--accounts/gkleen@sif/shell/quickshell/SystemTray.qml49
1 files changed, 40 insertions, 9 deletions
diff --git a/accounts/gkleen@sif/shell/quickshell/SystemTray.qml b/accounts/gkleen@sif/shell/quickshell/SystemTray.qml
index 956f3995..351e74ee 100644
--- a/accounts/gkleen@sif/shell/quickshell/SystemTray.qml
+++ b/accounts/gkleen@sif/shell/quickshell/SystemTray.qml
@@ -1,4 +1,5 @@
1import QtQuick 1import QtQuick
2import QtQuick.Effects
2import Quickshell 3import Quickshell
3import Quickshell.Widgets 4import Quickshell.Widgets
4import Quickshell.Services.SystemTray 5import Quickshell.Services.SystemTray
@@ -28,6 +29,9 @@ Item {
28 delegate: Item { 29 delegate: Item {
29 id: trayItemWrapper 30 id: trayItemWrapper
30 31
32 required property var modelData
33 required property int index
34
31 property var trayItem: modelData 35 property var trayItem: modelData
32 property string iconSource: { 36 property string iconSource: {
33 let icon = trayItem && trayItem.icon 37 let icon = trayItem && trayItem.icon
@@ -47,7 +51,7 @@ Item {
47 return "" 51 return ""
48 } 52 }
49 53
50 width: 16 54 width: icon.width + 6
51 height: parent.height 55 height: parent.height
52 anchors.verticalCenter: parent.verticalCenter 56 anchors.verticalCenter: parent.verticalCenter
53 57
@@ -83,14 +87,41 @@ Item {
83 } 87 }
84 } 88 }
85 89
86 IconImage { 90 Rectangle {
87 anchors.centerIn: parent 91 anchors.fill: parent
88 width: parent.width 92 color: {
89 height: parent.width 93 if (trayItemArea.containsMouse)
90 source: trayItemWrapper.iconSource 94 return "#33808080";
91 asynchronous: true 95 return "transparent";
92 smooth: true 96 }
93 mipmap: true 97
98 Item {
99 anchors.fill: parent
100
101 layer.enabled: true
102 layer.effect: MultiEffect {
103 colorization: 1
104 colorizationColor: "#555"
105 }
106
107 IconImage {
108 id: icon
109
110 anchors.centerIn: parent
111 implicitSize: 16
112 source: trayItemWrapper.iconSource
113 asynchronous: true
114 smooth: true
115 mipmap: true
116
117 layer.enabled: true
118 layer.effect: MultiEffect {
119 id: effect
120
121 brightness: 1
122 }
123 }
124 }
94 } 125 }
95 } 126 }
96 127