Files
ricing/quickshell/default/MenuEntry.qml
nico 3b1eb02159 Add Quickshell power button with reboot/shutdown/logout dropdown
Replaces the removed Waybar custom/power module with a Quickshell-rendered
button anchored to the same spot in the bar, opening a proper anchored
dropdown (Neustart/Herunterfahren/Abmelden, localized via $LANG) instead of
a screen-centered rofi menu. Waybar keeps a blank spacer module reserving
the space. Styled to match the rice's blue accent and the bar's pill look.
2026-07-27 19:15:49 +02:00

41 lines
871 B
QML

import QtQuick
import QtQuick.Layouts
Rectangle {
id: root
required property string label
required property string icon
signal triggered()
Layout.fillWidth: true
implicitHeight: 32
radius: 8
color: ma.containsMouse ? "#1793d1" : "transparent"
Row {
anchors.centerIn: parent
spacing: 8
Text {
text: root.icon
font.family: "JetBrainsMono Nerd Font"
font.pixelSize: 14
color: ma.containsMouse ? "#0f111a" : "#7aa2f7"
}
Text {
text: root.label
font.family: "JetBrainsMono Nerd Font"
font.pixelSize: 13
color: ma.containsMouse ? "#0f111a" : "#c0caf5"
}
}
MouseArea {
id: ma
anchors.fill: parent
hoverEnabled: true
onClicked: root.triggered()
}
}