Files
dotfiles/.config/quickshell/own/modules/PowerMenuWidget.qml
T

21 lines
527 B
QML

// modules/PowerMenuWidget.qml - ⏻ button with inline popup menu.
import QtQuick
import QtQuick.Layouts
import Quickshell.Io
import ".."
Pill {
id: root
onHoveredChanged: {
if (hovered) GlobalStates.popups.toggle("powerMenu", mapToItem(null, width / 2, 0).x)
}
onClicked: {
GlobalStates.popups.toggle("powerMenu", mapToItem(null, width / 2, 0).x)
}
Text {
text: " "
font { family: Theme.fontMono; pixelSize: Theme.fontSize }
color: Theme.pillText
}
}