Files
quickshell/modules/bar/widgets/PowerButton.qml
T
2026-06-14 01:15:30 +02:00

32 lines
899 B
QML

import QtQuick
import Quickshell
import "../../../config"
MouseArea {
id: powerButton
width: Math.max(powerText.width + Config.spacing_fun(height), height)
height: bar.height
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: {
console.log("[PowerButton] Opening wlogout")
root.openWlogout()
}
Rectangle {
anchors.fill: parent
color: powerButton.containsMouse ? Colors.secondaryContainer_fg : Qt.alpha(Colors.secondary, 0.75)
radius: Config.radius_fun(powerButton.height)
border.width: 0
Text {
id: powerText
anchors.centerIn: parent
text: ""
font.pixelSize: Config.bigIconSize(bar.height)
font.family: Config.font
color:powerButton.containsMouse ? Colors.secondaryContainer : Colors.secondary_fg
}
}
}