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 onClicked: InhibitorState.lidSwitchInhibited = !InhibitorState.lidSwitchInhibited 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.lidSwitchInhibited ? "laptop-off" : "laptop" color: InhibitorState.lidSwitchInhibited ? "#f28a21" : "#555" } } } } }