From 666464567055a2e4ba9f6bb310e901cdc27977f7 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 12 Sep 2025 22:01:51 +0200 Subject: ... --- .../quickshell/NotificationInhibitorWidget.qml | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 accounts/gkleen@sif/shell/quickshell/NotificationInhibitorWidget.qml (limited to 'accounts/gkleen@sif/shell/quickshell/NotificationInhibitorWidget.qml') diff --git a/accounts/gkleen@sif/shell/quickshell/NotificationInhibitorWidget.qml b/accounts/gkleen@sif/shell/quickshell/NotificationInhibitorWidget.qml new file mode 100644 index 00000000..3dadbc69 --- /dev/null +++ b/accounts/gkleen@sif/shell/quickshell/NotificationInhibitorWidget.qml @@ -0,0 +1,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" + } + } + } + } +} -- cgit v1.2.3