Re-indent SDDM QML theme properly
This commit is contained in:
parent
ac75b97fc3
commit
de0def570c
@ -1,6 +1,6 @@
|
|||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
* Copyright (c) 2013 Abdurrahman AVCI <abdurrahmanavci@gmail.com
|
* Copyright (c) 2013 Abdurrahman AVCI <abdurrahmanavci@gmail.com
|
||||||
* Copyright (c) 2015-2018 Lubuntu Artwork Team
|
* Copyright (c) 2015-2024 Lubuntu Artwork Team
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person
|
* Permission is hereby granted, free of charge, to any person
|
||||||
* obtaining a copy of this software and associated documentation
|
* obtaining a copy of this software and associated documentation
|
||||||
@ -49,7 +49,7 @@ Rectangle {
|
|||||||
Repeater {
|
Repeater {
|
||||||
model: screenModel
|
model: screenModel
|
||||||
Background {
|
Background {
|
||||||
x: geometry.x; y: geometry.y; width: geometry.width; height:geometry.height
|
x: geometry.x; y: geometry.y; width: geometry.width; height: geometry.height
|
||||||
source: config.background
|
source: config.background
|
||||||
fillMode: Image.PreserveAspectCrop
|
fillMode: Image.PreserveAspectCrop
|
||||||
onStatusChanged: {
|
onStatusChanged: {
|
||||||
@ -90,166 +90,171 @@ Rectangle {
|
|||||||
Row {
|
Row {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: txtMessage
|
id: txtMessage
|
||||||
anchors.top: usersContainer.bottom;
|
anchors.top: usersContainer.bottom
|
||||||
anchors.margins: 20
|
anchors.margins: 20
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
color: "white"
|
color: "white"
|
||||||
text: textConstants.promptSelectUser
|
text: textConstants.promptSelectUser
|
||||||
font.pixelSize: 16
|
font.pixelSize: 16
|
||||||
font.family: "Ubuntu"
|
font.family: "Ubuntu"
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: usersContainer
|
||||||
|
width: parent.width
|
||||||
|
height: 300
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
|
ImageButton {
|
||||||
|
id: prevUser
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.margins: 10
|
||||||
|
source: "angle-left.png"
|
||||||
|
onClicked: listView.decrementCurrentIndex()
|
||||||
|
|
||||||
|
KeyNavigation.backtab: btnShutdown
|
||||||
|
KeyNavigation.tab: listView
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
ListView {
|
||||||
id: usersContainer
|
id: listView
|
||||||
width: parent.width; height: 300
|
height: parent.height
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.left: prevUser.right
|
||||||
|
anchors.right: nextUser.left
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.margins: 10
|
||||||
|
|
||||||
ImageButton {
|
clip: true
|
||||||
id: prevUser
|
focus: true
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
anchors.margins: 10
|
|
||||||
source: "angle-left.png"
|
|
||||||
onClicked: listView.decrementCurrentIndex()
|
|
||||||
|
|
||||||
KeyNavigation.backtab: btnShutdown; KeyNavigation.tab: listView
|
spacing: 5
|
||||||
}
|
|
||||||
|
|
||||||
|
model: userModel
|
||||||
|
delegate: userDelegate
|
||||||
|
orientation: ListView.Horizontal
|
||||||
|
currentIndex: userModel.lastIndex
|
||||||
|
|
||||||
|
KeyNavigation.backtab: prevUser
|
||||||
ListView {
|
KeyNavigation.tab: nextUser
|
||||||
id: listView
|
|
||||||
height: parent.height
|
|
||||||
anchors.left: prevUser.right; anchors.right: nextUser.left
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
anchors.margins: 10
|
|
||||||
|
|
||||||
clip: true
|
|
||||||
focus: true
|
|
||||||
|
|
||||||
spacing: 5
|
|
||||||
|
|
||||||
model: userModel
|
|
||||||
delegate: userDelegate
|
|
||||||
orientation: ListView.Horizontal
|
|
||||||
currentIndex: userModel.lastIndex
|
|
||||||
|
|
||||||
KeyNavigation.backtab: prevUser; KeyNavigation.tab: nextUser
|
|
||||||
}
|
|
||||||
|
|
||||||
ImageButton {
|
|
||||||
id: nextUser
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
anchors.margins: 10
|
|
||||||
source: "angle-right.png"
|
|
||||||
onClicked: listView.incrementCurrentIndex()
|
|
||||||
KeyNavigation.backtab: listView; KeyNavigation.tab: session
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImageButton {
|
||||||
|
id: nextUser
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
anchors.margins: 10
|
||||||
|
source: "angle-right.png"
|
||||||
|
onClicked: listView.incrementCurrentIndex()
|
||||||
|
KeyNavigation.backtab: listView
|
||||||
|
KeyNavigation.tab: session
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: actionBar
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
width: parent.width
|
||||||
|
height: 64
|
||||||
|
color: "#44ffffff"
|
||||||
|
|
||||||
|
Row {
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.margins: 5
|
||||||
|
height: parent.height
|
||||||
|
spacing: 5
|
||||||
|
|
||||||
|
Text {
|
||||||
|
height: parent.height
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
text: textConstants.session
|
||||||
|
font.pixelSize: 14
|
||||||
|
color: "white"
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
}
|
||||||
|
|
||||||
|
ComboBox {
|
||||||
|
id: session
|
||||||
|
width: 245
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
arrowIcon: "angle-down.png"
|
||||||
|
model: sessionModel
|
||||||
|
index: sessionModel.lastIndex
|
||||||
|
font.pixelSize: 14
|
||||||
|
color: "#44ffffff"
|
||||||
|
KeyNavigation.backtab: nextUser
|
||||||
|
KeyNavigation.tab: layoutBox
|
||||||
|
}
|
||||||
|
|
||||||
|
Text {
|
||||||
|
height: parent.height
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
text: textConstants.layout
|
||||||
|
font.pixelSize: 14
|
||||||
|
color: "white"
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
}
|
||||||
|
|
||||||
|
LayoutBox {
|
||||||
|
id: layoutBox
|
||||||
|
width: 90
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
font.pixelSize: 14
|
||||||
|
arrowIcon: "angle-down.png"
|
||||||
|
KeyNavigation.backtab: session
|
||||||
|
KeyNavigation.tab: btnShutdown
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Row {
|
||||||
id: actionBar
|
height: parent.height
|
||||||
anchors.top: parent.top;
|
anchors.right: parent.right
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.margins: 5
|
||||||
width: parent.width; height: 64
|
spacing: 5
|
||||||
color: "#44ffffff"
|
|
||||||
|
|
||||||
Row {
|
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.margins: 5
|
|
||||||
height: parent.height
|
|
||||||
spacing: 5
|
|
||||||
|
|
||||||
Text {
|
|
||||||
height: parent.height
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
text: textConstants.session
|
|
||||||
font.pixelSize: 14
|
|
||||||
color: "white"
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
}
|
|
||||||
|
|
||||||
ComboBox {
|
|
||||||
id: session
|
|
||||||
width: 245
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
arrowIcon: "angle-down.png"
|
|
||||||
model: sessionModel
|
|
||||||
index: sessionModel.lastIndex
|
|
||||||
font.pixelSize: 14
|
|
||||||
color: "#44ffffff"
|
|
||||||
KeyNavigation.backtab: nextUser; KeyNavigation.tab: layoutBox
|
|
||||||
}
|
|
||||||
|
|
||||||
Text {
|
|
||||||
height: parent.height
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
text: textConstants.layout
|
|
||||||
font.pixelSize: 14
|
|
||||||
color: "white"
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
|
||||||
}
|
|
||||||
|
|
||||||
LayoutBox {
|
|
||||||
id: layoutBox
|
|
||||||
width: 90
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
font.pixelSize: 14
|
|
||||||
arrowIcon: "angle-down.png"
|
|
||||||
KeyNavigation.backtab: session; KeyNavigation.tab: btnShutdown
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Row {
|
|
||||||
height: parent.height
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.margins: 5
|
|
||||||
spacing: 5
|
|
||||||
|
|
||||||
Clock {
|
Clock {
|
||||||
id: clock
|
id: clock
|
||||||
color: "white"
|
color: "white"
|
||||||
timeFont.family: "Ubuntu"
|
timeFont.family: "Ubuntu"
|
||||||
timeFont.bold: true
|
timeFont.bold: true
|
||||||
timeFont.pixelSize: 28
|
timeFont.pixelSize: 28
|
||||||
dateFont.pixelSize: 12
|
dateFont.pixelSize: 12
|
||||||
}
|
}
|
||||||
|
|
||||||
ImageButton {
|
ImageButton {
|
||||||
id: btnSuspend
|
id: btnSuspend
|
||||||
height: parent.height
|
height: parent.height
|
||||||
source: "suspend.png"
|
source: "suspend.png"
|
||||||
visible: sddm.canSuspend
|
visible: sddm.canSuspend
|
||||||
onClicked: sddm.suspend()
|
onClicked: sddm.suspend()
|
||||||
KeyNavigation.backtab: layoutBox; KeyNavigation.tab: btnReboot
|
KeyNavigation.backtab: layoutBox
|
||||||
}
|
KeyNavigation.tab: btnReboot
|
||||||
|
}
|
||||||
ImageButton {
|
|
||||||
id: btnReboot
|
|
||||||
height: parent.height
|
|
||||||
source: "reboot.png"
|
|
||||||
visible: sddm.canReboot
|
|
||||||
onClicked: sddm.reboot()
|
|
||||||
KeyNavigation.backtab: btnSuspend; KeyNavigation.tab: btnShutdown
|
|
||||||
}
|
|
||||||
|
|
||||||
ImageButton {
|
|
||||||
id: btnShutdown
|
|
||||||
height: parent.height
|
|
||||||
source: "shutdown.png"
|
|
||||||
visible: sddm.canPowerOff
|
|
||||||
onClicked: sddm.powerOff()
|
|
||||||
KeyNavigation.backtab: btnReboot; KeyNavigation.tab: prevUser
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
ImageButton {
|
||||||
|
id: btnReboot
|
||||||
|
height: parent.height
|
||||||
|
source: "reboot.png"
|
||||||
|
visible: sddm.canReboot
|
||||||
|
onClicked: sddm.reboot()
|
||||||
|
KeyNavigation.backtab: btnSuspend
|
||||||
|
KeyNavigation.tab: btnShutdown
|
||||||
|
}
|
||||||
|
|
||||||
|
ImageButton {
|
||||||
|
id: btnShutdown
|
||||||
|
height: parent.height
|
||||||
|
source: "shutdown.png"
|
||||||
|
visible: sddm.canPowerOff
|
||||||
|
onClicked: sddm.powerOff()
|
||||||
|
KeyNavigation.backtab: btnReboot
|
||||||
|
KeyNavigation.tab: prevUser
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user