non important commit

This commit is contained in:
benstrb 2026-03-08 18:52:40 +01:00
parent cb2c336e17
commit 069a5df2b9
7 changed files with 259 additions and 171 deletions

View file

@ -0,0 +1,86 @@
pragma ComponentBehavior: Bound
import Quickshell
import QtQuick
import QtQuick.Controls
PanelWindow {
id: powerPopup
required property bool expanderOpen
required property color bgColor
required property color recColor
required property int recRadius
required property int barWidth
anchors.left: true
anchors.bottom: true
implicitWidth: (expanderOpen || powerAnim.running) ? 140 : 0
implicitHeight: (expanderOpen || powerAnim.running) ? 100 : 0
color: "transparent"
Rectangle {
id: powerRectangle
y: parent.height - height
x: powerPopup.expanderOpen ? 0 : -(width + powerPopup.barWidth)
width: 140
height: 100
color: powerPopup.bgColor
Behavior on x {
NumberAnimation {
id: powerAnim
duration: 400
easing.type: Easing.OutCubic
}
}
Row {
anchors.centerIn: powerRectangle
spacing: 10
Rectangle {
color: powerPopup.recColor
width: 50
height: 50
radius: powerPopup.recRadius * 2
Button {
anchors.fill: parent
opacity: 0
onClicked: Quickshell.execDetached(["poweroff"])
}
Image {
anchors.centerIn: parent
source: "file://" + Quickshell.shellDir + "/assets/power.svg"
sourceSize.width: 28
sourceSize.height: 28
}
}
Rectangle {
color: powerPopup.recColor
width: 50
height: 50
radius: powerPopup.recRadius * 2
Button {
anchors.fill: parent
opacity: 0
onClicked: Quickshell.execDetached(["reboot"])
}
Image {
anchors.centerIn: parent
source: "file://" + Quickshell.shellDir + "/assets/reboot.svg"
sourceSize.width: 28
sourceSize.height: 28
}
}
}
}
}