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 // enabled: InhibitorState.lockscreenInhibited || !InhibitorState.waylandIdleInhibited hoverEnabled: true cursorShape: widgetMouseArea.enabled ? Qt.PointingHandCursor : undefined onClicked: InhibitorState.lockscreenInhibited = !InhibitorState.lockscreenInhibited 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: InhibitorState.lockscreenInhibited || InhibitorState.waylandIdleInhibited ? "lock-off" : "lock" color: InhibitorState.lockscreenInhibited ? "#f28a21" : "#555" } } } } }