Port SDDM theme to Qt 6
This commit is contained in:
parent
de0def570c
commit
01a639a57c
@ -35,6 +35,17 @@ Rectangle {
|
|||||||
|
|
||||||
TextConstants { id: textConstants }
|
TextConstants { id: textConstants }
|
||||||
|
|
||||||
|
Background {
|
||||||
|
anchors.fill: parent
|
||||||
|
source: Qt.resolvedUrl(config.background)
|
||||||
|
onStatusChanged: {
|
||||||
|
var defaultBackground = Qt.resolvedUrl(config.defaultBackground)
|
||||||
|
if (status == Image.Error && source != defaultBackground) {
|
||||||
|
source = defaultBackground
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: sddm
|
target: sddm
|
||||||
onLoginSucceeded: {
|
onLoginSucceeded: {
|
||||||
@ -112,7 +123,7 @@ Rectangle {
|
|||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.margins: 10
|
anchors.margins: 10
|
||||||
source: "angle-left.png"
|
source: Qt.resolvedUrl("angle-left.png")
|
||||||
onClicked: listView.decrementCurrentIndex()
|
onClicked: listView.decrementCurrentIndex()
|
||||||
|
|
||||||
KeyNavigation.backtab: btnShutdown
|
KeyNavigation.backtab: btnShutdown
|
||||||
@ -146,7 +157,7 @@ Rectangle {
|
|||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.margins: 10
|
anchors.margins: 10
|
||||||
source: "angle-right.png"
|
source: Qt.resolvedUrl("angle-right.png")
|
||||||
onClicked: listView.incrementCurrentIndex()
|
onClicked: listView.incrementCurrentIndex()
|
||||||
KeyNavigation.backtab: listView
|
KeyNavigation.backtab: listView
|
||||||
KeyNavigation.tab: session
|
KeyNavigation.tab: session
|
||||||
@ -182,7 +193,7 @@ Rectangle {
|
|||||||
id: session
|
id: session
|
||||||
width: 245
|
width: 245
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
arrowIcon: "angle-down.png"
|
arrowIcon: Qt.resolvedUrl("angle-down.png")
|
||||||
model: sessionModel
|
model: sessionModel
|
||||||
index: sessionModel.lastIndex
|
index: sessionModel.lastIndex
|
||||||
font.pixelSize: 14
|
font.pixelSize: 14
|
||||||
@ -205,7 +216,7 @@ Rectangle {
|
|||||||
width: 90
|
width: 90
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
font.pixelSize: 14
|
font.pixelSize: 14
|
||||||
arrowIcon: "angle-down.png"
|
arrowIcon: Qt.resolvedUrl("angle-down.png")
|
||||||
KeyNavigation.backtab: session
|
KeyNavigation.backtab: session
|
||||||
KeyNavigation.tab: btnShutdown
|
KeyNavigation.tab: btnShutdown
|
||||||
}
|
}
|
||||||
@ -229,7 +240,7 @@ Rectangle {
|
|||||||
ImageButton {
|
ImageButton {
|
||||||
id: btnSuspend
|
id: btnSuspend
|
||||||
height: parent.height
|
height: parent.height
|
||||||
source: "suspend.png"
|
source: Qt.resolvedUrl("suspend.png")
|
||||||
visible: sddm.canSuspend
|
visible: sddm.canSuspend
|
||||||
onClicked: sddm.suspend()
|
onClicked: sddm.suspend()
|
||||||
KeyNavigation.backtab: layoutBox
|
KeyNavigation.backtab: layoutBox
|
||||||
@ -239,7 +250,7 @@ Rectangle {
|
|||||||
ImageButton {
|
ImageButton {
|
||||||
id: btnReboot
|
id: btnReboot
|
||||||
height: parent.height
|
height: parent.height
|
||||||
source: "reboot.png"
|
source: Qt.resolvedUrl("reboot.png")
|
||||||
visible: sddm.canReboot
|
visible: sddm.canReboot
|
||||||
onClicked: sddm.reboot()
|
onClicked: sddm.reboot()
|
||||||
KeyNavigation.backtab: btnSuspend
|
KeyNavigation.backtab: btnSuspend
|
||||||
@ -249,7 +260,7 @@ Rectangle {
|
|||||||
ImageButton {
|
ImageButton {
|
||||||
id: btnShutdown
|
id: btnShutdown
|
||||||
height: parent.height
|
height: parent.height
|
||||||
source: "shutdown.png"
|
source: Qt.resolvedUrl("shutdown.png")
|
||||||
visible: sddm.canPowerOff
|
visible: sddm.canPowerOff
|
||||||
onClicked: sddm.powerOff()
|
onClicked: sddm.powerOff()
|
||||||
KeyNavigation.backtab: btnReboot
|
KeyNavigation.backtab: btnReboot
|
||||||
|
@ -13,3 +13,4 @@ ConfigFile=theme.conf
|
|||||||
TranslationsDirectory=translations
|
TranslationsDirectory=translations
|
||||||
Theme-Id=lubuntu
|
Theme-Id=lubuntu
|
||||||
Theme-API=2.0
|
Theme-API=2.0
|
||||||
|
QtVersion=6
|
||||||
|
Loading…
x
Reference in New Issue
Block a user