mirror of
https://github.com/Keyitdev/sddm-astronaut-theme.git
synced 2026-09-24 02:22:09 +00:00
Update: Changed position of the session button, changed order of system buttons, other small fixes.
This commit is contained in:
@@ -476,15 +476,10 @@ Column {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SessionButton {
|
|
||||||
id: sessionSelect
|
|
||||||
loginButtonWidth: loginButton.background.width
|
|
||||||
}
|
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: sddm
|
target: sddm
|
||||||
onLoginSucceeded: {}
|
function onLoginSucceeded() {}
|
||||||
onLoginFailed: {
|
function onLoginFailed() {
|
||||||
failed = true
|
failed = true
|
||||||
resetError.running ? resetError.stop() && resetError.start() : resetError.start()
|
resetError.running ? resetError.stop() && resetError.start() : resetError.start()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ Item {
|
|||||||
// change also in errorMessage
|
// change also in errorMessage
|
||||||
height: root.font.pointSize * 2
|
height: root.font.pointSize * 2
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
anchors.left: parent.left
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
Keys.onPressed: {
|
Keys.onPressed: {
|
||||||
if (event.key == Qt.Key_Up && loginButton.state != "enabled" && !popup.opened)
|
if (event.key == Qt.Key_Up && loginButton.state != "enabled" && !popup.opened)
|
||||||
revealSecret.focus = true,
|
revealSecret.focus = true,
|
||||||
@@ -67,11 +67,9 @@ Item {
|
|||||||
|
|
||||||
contentItem: Text {
|
contentItem: Text {
|
||||||
id: displayedItem
|
id: displayedItem
|
||||||
text: selectSession.currentText
|
text: (config.TranslateSessionSelection || "Session") + " (" + selectSession.currentText + ")"
|
||||||
color: root.palette.text
|
color: root.palette.text
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.leftMargin: 3
|
|
||||||
font.pointSize: root.font.pointSize * 0.8
|
font.pointSize: root.font.pointSize * 0.8
|
||||||
font.family: root.font.family
|
font.family: root.font.family
|
||||||
Keys.onReleased: parent.popup.open()
|
Keys.onReleased: parent.popup.open()
|
||||||
@@ -90,9 +88,10 @@ Item {
|
|||||||
|
|
||||||
popup: Popup {
|
popup: Popup {
|
||||||
id: popupHandler
|
id: popupHandler
|
||||||
y: parent.height - 1
|
|
||||||
x: config.RightToLeftLayout == "true" ? -loginButtonWidth + displayedItem.width : 0
|
|
||||||
width: sessionButton.width
|
width: sessionButton.width
|
||||||
|
y: parent.height - 1
|
||||||
|
x: -popupHandler.width/2 + displayedItem.width/2
|
||||||
|
// x: config.RightToLeftLayout == "true" ? -loginButtonWidth + displayedItem.width : 0
|
||||||
implicitHeight: contentItem.implicitHeight
|
implicitHeight: contentItem.implicitHeight
|
||||||
padding: 10
|
padding: 10
|
||||||
|
|
||||||
|
|||||||
@@ -11,17 +11,17 @@ RowLayout {
|
|||||||
|
|
||||||
spacing: root.font.pointSize
|
spacing: root.font.pointSize
|
||||||
|
|
||||||
|
property var shutdown: ["Shutdown", config.TranslateShutdown || textConstants.shutdown, sddm.canPowerOff]
|
||||||
|
property var reboot: ["Reboot", config.TranslateReboot || textConstants.reboot, sddm.canReboot]
|
||||||
property var suspend: ["Suspend", config.TranslateSuspend || textConstants.suspend, sddm.canSuspend]
|
property var suspend: ["Suspend", config.TranslateSuspend || textConstants.suspend, sddm.canSuspend]
|
||||||
property var hibernate: ["Hibernate", config.TranslateHibernate || textConstants.hibernate, sddm.canHibernate]
|
property var hibernate: ["Hibernate", config.TranslateHibernate || textConstants.hibernate, sddm.canHibernate]
|
||||||
property var reboot: ["Reboot", config.TranslateReboot || textConstants.reboot, sddm.canReboot]
|
|
||||||
property var shutdown: ["Shutdown", config.TranslateShutdown || textConstants.shutdown, sddm.canPowerOff]
|
|
||||||
|
|
||||||
property Control exposedSession
|
property Control exposedSession
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
|
|
||||||
id: systemButtons
|
id: systemButtons
|
||||||
model: [suspend, hibernate, reboot, shutdown]
|
model: [shutdown, reboot, suspend, hibernate]
|
||||||
|
|
||||||
RoundButton {
|
RoundButton {
|
||||||
text: modelData[1]
|
text: modelData[1]
|
||||||
@@ -34,7 +34,7 @@ RowLayout {
|
|||||||
display: AbstractButton.TextUnderIcon
|
display: AbstractButton.TextUnderIcon
|
||||||
visible: config.HideSystemButtons != "true" && modelData[2]
|
visible: config.HideSystemButtons != "true" && modelData[2]
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
palette.buttonText: root.palette.text
|
palette.buttonText: config.SystemButtonsIconColor
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
height: 2
|
height: 2
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
@@ -46,7 +46,7 @@ RowLayout {
|
|||||||
Keys.onReturnPressed: clicked()
|
Keys.onReturnPressed: clicked()
|
||||||
onClicked: {
|
onClicked: {
|
||||||
parent.forceActiveFocus()
|
parent.forceActiveFocus()
|
||||||
index == 0 ? sddm.suspend() : index == 1 ? sddm.hibernate() : index == 2 ? sddm.reboot() : sddm.powerOff()
|
index == 0 ? sddm.powerOff() : index == 1 ? sddm.reboot() : index == 2 ? sddm.suspend() : sddm.hibernate()
|
||||||
}
|
}
|
||||||
KeyNavigation.up: exposedSession
|
KeyNavigation.up: exposedSession
|
||||||
KeyNavigation.left: parent.children[index-1]
|
KeyNavigation.left: parent.children[index-1]
|
||||||
|
|||||||
@@ -25,11 +25,11 @@ Pane {
|
|||||||
palette.window: config.BackgroundColor
|
palette.window: config.BackgroundColor
|
||||||
palette.text: config.TextColor
|
palette.text: config.TextColor
|
||||||
palette.shadow: config.PlaceholderColor
|
palette.shadow: config.PlaceholderColor
|
||||||
palette.buttonText: root.palette.text
|
palette.buttonText: config.TextColor
|
||||||
palette.highlightedText: config.HighlightTextColor == "" ? root.palette.highlight : config.HighlightTextColor
|
palette.highlightedText: config.HighlightTextColor == "" ? config.HighlightColor : config.HighlightTextColor
|
||||||
palette.link: config.LoginButtonBackgroundColor == "" ? root.palette.highlight : config.LoginButtonBackgroundColor
|
palette.link: config.LoginButtonBackgroundColor == "" ? config.HighlightColor : config.LoginButtonBackgroundColor
|
||||||
palette.mid: config.LoginButtonTextColor == "" ? root.palette.text : config.LoginButtonTextColor
|
palette.mid: config.LoginButtonTextColor == "" ? config.TextColor : config.LoginButtonTextColor
|
||||||
palette.alternateBase: config.BackgroundListColor == "" ? root.palette.window : config.BackgroundListColor
|
palette.alternateBase: config.BackgroundListColor == "" ? config.BackgroundColor: config.BackgroundListColor
|
||||||
|
|
||||||
font.family: config.Font
|
font.family: config.Font
|
||||||
font.pointSize: config.FontSize !== "" ? config.FontSize : parseInt(height / 80)
|
font.pointSize: config.FontSize !== "" ? config.FontSize : parseInt(height / 80)
|
||||||
@@ -91,8 +91,14 @@ Pane {
|
|||||||
anchors.left: config.FormPosition == "left" ? parent.left : undefined
|
anchors.left: config.FormPosition == "left" ? parent.left : undefined
|
||||||
anchors.right: config.FormPosition == "right" ? parent.right : undefined
|
anchors.right: config.FormPosition == "right" ? parent.right : undefined
|
||||||
z: 1
|
z: 1
|
||||||
|
|
||||||
|
SessionButton {
|
||||||
|
id: sessionSelect
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.bottomMargin: 70
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
id: vkb
|
id: vkb
|
||||||
checkable: true
|
checkable: true
|
||||||
|
|||||||
@@ -122,5 +122,6 @@ TranslateSuspend=""
|
|||||||
TranslateHibernate=""
|
TranslateHibernate=""
|
||||||
TranslateReboot=""
|
TranslateReboot=""
|
||||||
TranslateShutdown=""
|
TranslateShutdown=""
|
||||||
|
TranslateSessionSelection=""
|
||||||
TranslateVirtualKeyboardButtonOn=""
|
TranslateVirtualKeyboardButtonOn=""
|
||||||
TranslateVirtualKeyboardButtonOff=""
|
TranslateVirtualKeyboardButtonOff=""
|
||||||
Reference in New Issue
Block a user