forked from Shinonome/dots-hyprland
waffles: add lock screen, fix ctrl alt del screen for light mode
This commit is contained in:
@@ -8,7 +8,6 @@ import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
|
||||
Item {
|
||||
id: root
|
||||
@@ -94,63 +93,13 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
component PowerButton: WSessionScreenTextButton {
|
||||
id: root
|
||||
implicitWidth: 40
|
||||
implicitHeight: 40
|
||||
focusRingRadius: Looks.radius.large
|
||||
colBackgroundHover: Looks.colors.bg2Hover
|
||||
colBackgroundActive: Looks.colors.bg2Active
|
||||
property color color: {
|
||||
if (root.down) {
|
||||
return root.colBackgroundActive;
|
||||
} else if (root.hovered) {
|
||||
return root.colBackgroundHover;
|
||||
} else {
|
||||
return root.colBackground;
|
||||
}
|
||||
}
|
||||
background: Rectangle {
|
||||
id: background
|
||||
radius: Looks.radius.medium
|
||||
color: root.color
|
||||
}
|
||||
contentItem: Item {
|
||||
FluentIcon {
|
||||
anchors.centerIn: parent
|
||||
implicitSize: 20
|
||||
icon: "power"
|
||||
}
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
powerMenu.visible = !powerMenu.visible;
|
||||
}
|
||||
|
||||
WMenu {
|
||||
id: powerMenu
|
||||
x: -powerMenu.implicitWidth / 2 + root.implicitWidth / 2
|
||||
y: -powerMenu.implicitHeight
|
||||
|
||||
Action {
|
||||
icon.name: "power"
|
||||
text: Translation.tr("Shut down")
|
||||
onTriggered: Session.poweroff()
|
||||
}
|
||||
Action {
|
||||
icon.name: "arrow-counterclockwise"
|
||||
text: Translation.tr("Restart")
|
||||
onTriggered: Session.reboot()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
component CancelButton: WBorderlessButton {
|
||||
id: root
|
||||
implicitHeight: 32
|
||||
colBackground: Looks.colors.bg1Base
|
||||
colBackgroundHover: Qt.lighter(Looks.colors.bg1Base, 1.2)
|
||||
colBackgroundActive: Qt.lighter(Looks.colors.bg1Base, 1.1)
|
||||
colBackground: Looks.darkColors.bg1Base
|
||||
colBackgroundHover: Qt.lighter(Looks.darkColors.bg1Base, 1.2)
|
||||
colBackgroundActive: Qt.lighter(Looks.darkColors.bg1Base, 1.1)
|
||||
colForeground: Looks.darkColors.fg
|
||||
|
||||
property bool keyboardDown: false
|
||||
|
||||
@@ -172,6 +121,7 @@ Item {
|
||||
text: Translation.tr("Cancel")
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
font.pixelSize: Looks.font.pixelSize.large
|
||||
color: root.colForeground
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
|
||||
Reference in New Issue
Block a user