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.qml80
1 files changed, 54 insertions, 26 deletions
diff --git a/accounts/gkleen@sif/shell/quickshell/SystemTray.qml b/accounts/gkleen@sif/shell/quickshell/SystemTray.qml
index 6f70be29..f7b4ed96 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
@@ -91,15 +95,32 @@ Item {
91 return "transparent"; 95 return "transparent";
92 } 96 }
93 97
94 IconImage { 98 Item {
95 id: icon 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
96 120
97 anchors.centerIn: parent 121 brightness: 1
98 implicitSize: 16 122 }
99 source: trayItemWrapper.iconSource 123 }
100 asynchronous: true
101 smooth: true
102 mipmap: true
103 } 124 }
104 } 125 }
105 } 126 }
@@ -134,32 +155,39 @@ Item {
134 hoverEnabled: true 155 hoverEnabled: true
135 enabled: true 156 enabled: true
136 157
137 margin: 8 158 margin: 4
138 159
139 Column { 160 anchors.fill: parent
140 Text {
141 id: tooltipTitle
142 161
143 enabled: trayItem.tooltipTitle 162 Item {
163 anchors.fill: parent
144 164
145 font.pointSize: 10 165 Column {
146 font.family: "Fira Sans" 166 anchors.centerIn: parent
147 font.bold: true 167 Text {
148 color: "white" 168 id: tooltipTitle
149 169
150 text: trayItem.tooltipTitle 170 enabled: trayItem.tooltipTitle
151 } 171
172 font.pointSize: 10
173 font.family: "Fira Sans"
174 font.bold: true
175 color: "white"
176
177 text: trayItem.tooltipTitle
178 }
152 179
153 Text { 180 Text {
154 id: tooltipDescription 181 id: tooltipDescription
155 182
156 enabled: trayItem.tooltipDescription 183 enabled: trayItem.tooltipDescription
157 184
158 font.pointSize: 10 185 font.pointSize: 10
159 font.family: "Fira Sans" 186 font.family: "Fira Sans"
160 color: "white" 187 color: "white"
161 188
162 text: trayItem.tooltipDescription 189 text: trayItem.tooltipDescription
190 }
163 } 191 }
164 } 192 }
165 } 193 }