blob: 3dadbc69333442d05c4dac640636853163524642 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
import Quickshell
import QtQuick
import Quickshell.Widgets
import qs.Services
Item {
id: root
width: icon.width + 8
height: parent.height
anchors.verticalCenter: parent.verticalCenter
WrapperMouseArea {
id: widgetMouseArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: NotificationManager.displayInhibited = !NotificationManager.displayInhibited
Rectangle {
anchors.fill: parent
color: {
if (widgetMouseArea.containsMouse) {
return "#33808080";
}
return "transparent";
}
Item {
anchors.fill: parent
MaterialDesignIcon {
id: icon
implicitSize: 14
anchors.centerIn: parent
icon: NotificationManager.displayInhibited ? "message-off" : "message"
color: NotificationManager.displayInhibited ? "white" : "#555"
}
}
}
}
}
|