bar
This commit is contained in:
@@ -22,7 +22,10 @@ Item {
|
||||
text: " "
|
||||
font.pointSize: 16
|
||||
|
||||
onClicked: menu.visible = !menu.visible
|
||||
onClicked: {
|
||||
menu.visible = true
|
||||
grab.active = true
|
||||
}
|
||||
implicitHeight: parent.height
|
||||
}
|
||||
}
|
||||
@@ -34,9 +37,9 @@ Item {
|
||||
anchor.window: window
|
||||
anchor.rect.x: root.parent.x + root.parent.width - width
|
||||
anchor.rect.y: 50
|
||||
implicitWidth: 250
|
||||
implicitHeight: 150
|
||||
visible: true
|
||||
implicitWidth: 150
|
||||
implicitHeight: 250
|
||||
visible: false
|
||||
|
||||
color: "transparent"
|
||||
|
||||
@@ -48,32 +51,45 @@ Item {
|
||||
|
||||
ColumnLayout {
|
||||
|
||||
spacing: 2
|
||||
spacing: 0
|
||||
|
||||
Button {
|
||||
Layout.topMargin: 5
|
||||
x: (parent.width - width) / 2
|
||||
implicitWidth: parent.width - 10
|
||||
implicitHeight: parent.height / 4 - parent.spacing
|
||||
implicitHeight: parent.height / 5 - parent.spacing
|
||||
|
||||
text: 'shutdown'
|
||||
}
|
||||
|
||||
Button {
|
||||
x: (parent.width - width) / 2
|
||||
implicitWidth: parent.width - 10
|
||||
implicitHeight: parent.height / 4 - parent.spacing
|
||||
implicitHeight: parent.height / 5 - parent.spacing
|
||||
text: 'reboot'
|
||||
}
|
||||
|
||||
Button {
|
||||
x: (parent.width - width) / 2
|
||||
implicitWidth: parent.width - 10
|
||||
implicitHeight: parent.height / 4 - parent.spacing
|
||||
implicitHeight: parent.height / 5 - parent.spacing
|
||||
text: 'logout'
|
||||
}
|
||||
|
||||
Button {
|
||||
Layout.bottomMargin: 10
|
||||
x: (parent.width - width) / 2
|
||||
implicitWidth: parent.width - 10
|
||||
implicitHeight: parent.height / 4 - parent.spacing
|
||||
implicitHeight: parent.height / 5 - parent.spacing
|
||||
text: 'sleep'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HyprlandFocusGrab {
|
||||
id: grab
|
||||
windows: [ menu ]
|
||||
onCleared: menu.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user