forked from m-wynn/sddm_wynn-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PowerFrame.qml
116 lines (101 loc) · 3.53 KB
/
PowerFrame.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
import QtQuick 2.0
import QtGraphicalEffects 1.0
Item {
signal needClose()
signal needShutdown()
signal needRestart()
signal needSuspend()
property alias shutdown: shutdownButton
Row {
spacing: 70
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
Item {
width: 100
height: 150
ImgButton {
id: shutdownButton
width: 75
height: 75
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
normalImg: "icons/powerframe/shutdown_normal.png"
hoverImg: "icons/powerframe/shutdown_hover.png"
pressImg: "icons/powerframe/shutdown_press.png"
onClicked: needShutdown()
KeyNavigation.right: restartButton
KeyNavigation.left: suspendButton
Keys.onEscapePressed: needClose()
}
Text {
text: qsTr("Shutdown")
font.pointSize: 15
color: "white"
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
}
}
Item {
width: 100
height: 150
ImgButton {
id: restartButton
width: 75
height: 75
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
normalImg: "icons/powerframe/restart_normal.png"
hoverImg: "icons/powerframe/restart_hover.png"
pressImg: "icons/powerframe/restart_press.png"
onClicked: needRestart()
KeyNavigation.right: suspendButton
KeyNavigation.left: shutdownButton
Keys.onEscapePressed: needClose()
}
Text {
text: qsTr("Reboot")
font.pointSize: 15
color: "white"
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
}
}
Item {
width: 100
height: 150
ImgButton {
id: suspendButton
width: 75
height: 75
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
normalImg: "icons/powerframe/suspend_normal.png"
hoverImg: "icons/powerframe/suspend_hover.png"
pressImg: "icons/powerframe/suspend_press.png"
onClicked: needSuspend()
KeyNavigation.right: shutdownButton
KeyNavigation.left: restartButton
Keys.onEscapePressed: needClose()
}
Text {
text: qsTr("Suspend")
font.pointSize: 15
color: "white"
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
}
}
}
MouseArea {
z: -1
anchors.fill: parent
onClicked: needClose()
}
Keys.onEscapePressed: needClose()
}