Re-indent SDDM QML theme properly

ubuntu/oracular
Simon Quigley 6 months ago
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
}
ListView {
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
}
}
} }
}
Rectangle { Item {
id: actionBar id: usersContainer
anchors.top: parent.top; width: parent.width
anchors.horizontalCenter: parent.horizontalCenter height: 300
width: parent.width; height: 64 anchors.verticalCenter: parent.verticalCenter
color: "#44ffffff"
Row { ImageButton {
anchors.left: parent.left id: prevUser
anchors.margins: 5 anchors.left: parent.left
height: parent.height anchors.verticalCenter: parent.verticalCenter
spacing: 5 anchors.margins: 10
source: "angle-left.png"
Text { onClicked: listView.decrementCurrentIndex()
height: parent.height
anchors.verticalCenter: parent.verticalCenter
text: textConstants.session
font.pixelSize: 14
color: "white"
verticalAlignment: Text.AlignVCenter
}
ComboBox { KeyNavigation.backtab: btnShutdown
id: session KeyNavigation.tab: listView
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 { ListView {
id: listView
height: parent.height height: parent.height
anchors.left: prevUser.right
anchors.right: nextUser.left
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: textConstants.layout anchors.margins: 10
font.pixelSize: 14
color: "white" clip: true
verticalAlignment: Text.AlignVCenter focus: true
spacing: 5
model: userModel
delegate: userDelegate
orientation: ListView.Horizontal
currentIndex: userModel.lastIndex
KeyNavigation.backtab: prevUser
KeyNavigation.tab: nextUser
} }
LayoutBox { ImageButton {
id: layoutBox id: nextUser
width: 90 anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
font.pixelSize: 14 anchors.margins: 10
arrowIcon: "angle-down.png" source: "angle-right.png"
KeyNavigation.backtab: session; KeyNavigation.tab: btnShutdown 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 { Row {
anchors.left: parent.left
anchors.margins: 5
height: parent.height
spacing: 5
Text {
height: parent.height height: parent.height
anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter
anchors.margins: 5 text: textConstants.session
spacing: 5 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…
Cancel
Save