32 lines
875 B
QML
32 lines
875 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
|
|
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
|
|
}
|
|
}
|
|
} |