mirror of
https://github.com/Keyitdev/sddm-astronaut-theme.git
synced 2026-09-24 02:22:09 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ac297db891 | ||
|
|
07b64f0781 | ||
|
|
ad3390b420 | ||
|
|
57f0ae7221 | ||
|
|
60a73a22ef | ||
|
|
61e74ac096 |
@@ -1,10 +1,10 @@
|
|||||||
// Config created by Keyitdev https://github.com/Keyitdev/sddm-astronaut-theme
|
// Config created by Keyitdev https://github.com/Keyitdev/sddm-astronaut-theme
|
||||||
// Copyright (C) 2022-2025 Keyitdev
|
// Copyright (C) 2022-2026 Keyitdev
|
||||||
// Based on https://github.com/MarianArlt/sddm-sugar-dark
|
// Based on https://github.com/MarianArlt/sddm-sugar-dark
|
||||||
// Distributed under the GPLv3+ License https://www.gnu.org/licenses/gpl-3.0.html
|
// Distributed under the GPLv3+ License https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
id: clock
|
id: clock
|
||||||
@@ -13,11 +13,11 @@ Column {
|
|||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
id:headerTextLabel
|
id: headerTextLabel
|
||||||
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
font.pointSize: root.font.pointSize * 3
|
font.pixelSize: rootFontSize * 4
|
||||||
color: config.HeaderTextColor
|
color: config.HeaderTextColor
|
||||||
renderType: Text.QtRendering
|
renderType: Text.QtRendering
|
||||||
text: config.HeaderText
|
text: config.HeaderText
|
||||||
@@ -28,7 +28,7 @@ Column {
|
|||||||
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
font.pointSize: root.font.pointSize * 9
|
font.pixelSize: rootFontSize * 12
|
||||||
font.bold: true
|
font.bold: true
|
||||||
color: config.TimeTextColor
|
color: config.TimeTextColor
|
||||||
renderType: Text.QtRendering
|
renderType: Text.QtRendering
|
||||||
@@ -44,7 +44,7 @@ Column {
|
|||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
color: config.DateTextColor
|
color: config.DateTextColor
|
||||||
font.pointSize: root.font.pointSize * 2
|
font.pixelSize: rootFontSize * 2.66
|
||||||
font.bold: true
|
font.bold: true
|
||||||
renderType: Text.QtRendering
|
renderType: Text.QtRendering
|
||||||
|
|
||||||
|
|||||||
+123
-95
@@ -1,98 +1,105 @@
|
|||||||
// Config created by Keyitdev https://github.com/Keyitdev/sddm-astronaut-theme
|
// Config created by Keyitdev https://github.com/Keyitdev/sddm-astronaut-theme
|
||||||
// Copyright (C) 2022-2025 Keyitdev
|
// Copyright (C) 2022-2026 Keyitdev
|
||||||
// Based on https://github.com/MarianArlt/sddm-sugar-dark
|
// Based on https://github.com/MarianArlt/sddm-sugar-dark
|
||||||
// Distributed under the GPLv3+ License https://www.gnu.org/licenses/gpl-3.0.html
|
// Distributed under the GPLv3+ License https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
id: inputContainer
|
id: inputContainer
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
spacing: 0
|
||||||
|
|
||||||
property ComboBox exposeSession: sessionSelect.exposeSession
|
property ComboBox exposeSession: sessionSelect.exposeSession
|
||||||
property bool failed
|
property bool failed
|
||||||
|
|
||||||
function triggerLogin() {
|
readonly property real passwordFieldTopMargin: (Number(config.PasswordFieldTopMargin) || 0) * rootHeightUnit
|
||||||
var typedUser = username.text
|
readonly property real loginButtonTopMargin: (Number(config.LoginButtonTopMargin) || 0) * rootHeightUnit
|
||||||
var targetUser = typedUser
|
|
||||||
|
|
||||||
if (config.UseRealName == "true") {
|
function findRegisteredUser(typedUser, matchRealName) {
|
||||||
for (var i = 0; i < userRegistry.list.length; i++) {
|
for (var i = 0; i < userRegistry.list.length; i++) {
|
||||||
var u = userRegistry.list[i]
|
var candidate = userRegistry.list[i]
|
||||||
if (typedUser === u.realName || typedUser === u.name) {
|
if (typedUser === candidate.name || (matchRealName && typedUser === candidate.realName)) {
|
||||||
targetUser = u.name
|
return candidate
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (var j = 0; j < userRegistry.list.length; j++) {
|
|
||||||
var u2 = userRegistry.list[j]
|
|
||||||
if (typedUser === u2.name) {
|
|
||||||
targetUser = u2.name
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
property url currentUserIcon: {
|
||||||
|
var typedUser = username.text
|
||||||
|
if (typedUser === "") {
|
||||||
|
var highlighted = userRegistry.list[selectUser.currentIndex]
|
||||||
|
return highlighted ? (highlighted.icon || "") : ""
|
||||||
|
}
|
||||||
|
var match = findRegisteredUser(typedUser, true)
|
||||||
|
return match ? (match.icon || "") : ""
|
||||||
|
}
|
||||||
|
|
||||||
|
function triggerLogin() {
|
||||||
|
var typedUser = username.text
|
||||||
|
var match = findRegisteredUser(typedUser, config.UseRealName == "true")
|
||||||
|
var targetUser = match ? match.name : typedUser
|
||||||
|
|
||||||
sddm.login(targetUser, password.text, sessionSelect.selectedSession)
|
sddm.login(targetUser, password.text, sessionSelect.selectedSession)
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: errorMessageField
|
id: errorMessageField
|
||||||
|
|
||||||
// change also in selectSession
|
height: rootHeightUnit * 1.5
|
||||||
height: root.font.pointSize * 2
|
width: parent.width / 2
|
||||||
width: parent.width / 2
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
id: errorMessage
|
id: errorMessage
|
||||||
|
|
||||||
width: parent.width
|
width: parent.width
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
|
||||||
text: failed ? config.TranslateLoginFailedWarning || textConstants.loginFailed + "!" : keyboard.capsLock ? config.TranslateCapslockWarning || textConstants.capslockWarning : null
|
text: failed ? config.TranslateLoginFailedWarning || textConstants.loginFailed + "!" : keyboard.capsLock ? config.TranslateCapslockWarning || textConstants.capslockWarning : ""
|
||||||
font.pointSize: root.font.pointSize * 0.8
|
|
||||||
font.italic: true
|
|
||||||
color: config.WarningColor
|
|
||||||
opacity: 0
|
|
||||||
|
|
||||||
states: [
|
font.pixelSize: rootFontSize * 1.33
|
||||||
State {
|
font.italic: true
|
||||||
name: "fail"
|
color: config.WarningColor
|
||||||
when: failed
|
opacity: 0
|
||||||
PropertyChanges {
|
|
||||||
target: errorMessage
|
states: [
|
||||||
opacity: 1
|
State {
|
||||||
|
name: "fail"
|
||||||
|
when: failed
|
||||||
|
PropertyChanges {
|
||||||
|
target: errorMessage
|
||||||
|
opacity: 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
State {
|
||||||
|
name: "capslock"
|
||||||
|
when: keyboard.capsLock
|
||||||
|
PropertyChanges {
|
||||||
|
target: errorMessage
|
||||||
|
opacity: 1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
]
|
||||||
State {
|
transitions: [
|
||||||
name: "capslock"
|
Transition {
|
||||||
when: keyboard.capsLock
|
PropertyAnimation {
|
||||||
PropertyChanges {
|
properties: "opacity"
|
||||||
target: errorMessage
|
duration: 100
|
||||||
opacity: 1
|
}
|
||||||
}
|
}
|
||||||
}
|
]
|
||||||
]
|
}
|
||||||
transitions: [
|
|
||||||
Transition {
|
|
||||||
PropertyAnimation {
|
|
||||||
properties: "opacity"
|
|
||||||
duration: 100
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: usernameField
|
id: usernameField
|
||||||
|
|
||||||
height: root.font.pointSize * 4.5
|
height: username.height
|
||||||
width: parent.width / 2
|
width: parent.width / 2
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
@@ -102,6 +109,7 @@ Column {
|
|||||||
width: parent.height
|
width: parent.height
|
||||||
height: parent.height
|
height: parent.height
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: selectUser.height * 0.2
|
||||||
z: 2
|
z: 2
|
||||||
|
|
||||||
model: userModel
|
model: userModel
|
||||||
@@ -127,15 +135,20 @@ Column {
|
|||||||
|
|
||||||
delegate: ItemDelegate {
|
delegate: ItemDelegate {
|
||||||
// minus padding
|
// minus padding
|
||||||
width: popupHandler.width - 20
|
width: popupHandler.width - (rootWidthUnit * 1.5)
|
||||||
anchors.horizontalCenter: popupHandler.horizontalCenter
|
anchors.horizontalCenter: popupHandler.horizontalCenter
|
||||||
|
|
||||||
|
topPadding: rootScaleUnit * 6
|
||||||
|
bottomPadding: rootScaleUnit * 6
|
||||||
|
leftPadding: rootScaleUnit * 12
|
||||||
|
rightPadding: rootScaleUnit * 12
|
||||||
|
|
||||||
contentItem: Text {
|
contentItem: Text {
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
|
||||||
text: config.UseRealName == "true" ? (model.realName || model.name) : model.name
|
text: config.UseRealName == "true" ? (model.realName || model.name) : model.name
|
||||||
font.pointSize: root.font.pointSize * 0.8
|
font.pixelSize: rootFontSize * 1.06
|
||||||
font.capitalization: Font.MixedCase
|
font.capitalization: Font.MixedCase
|
||||||
font.family: root.font.family
|
font.family: root.font.family
|
||||||
color: config.DropdownTextColor
|
color: config.DropdownTextColor
|
||||||
@@ -153,10 +166,10 @@ Column {
|
|||||||
height: parent.height
|
height: parent.height
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.leftMargin: selectUser.height * 0
|
|
||||||
|
|
||||||
icon.height: parent.height * 0.25
|
|
||||||
icon.width: parent.height * 0.25
|
icon.height: parent.height * 0.4
|
||||||
|
icon.width: parent.height * 0.4
|
||||||
enabled: false
|
enabled: false
|
||||||
icon.color: config.UserIconColor
|
icon.color: config.UserIconColor
|
||||||
icon.source: Qt.resolvedUrl("../Assets/User.svg")
|
icon.source: Qt.resolvedUrl("../Assets/User.svg")
|
||||||
@@ -178,12 +191,12 @@ Column {
|
|||||||
implicitHeight: contentItem.implicitHeight
|
implicitHeight: contentItem.implicitHeight
|
||||||
width: usernameField.width
|
width: usernameField.width
|
||||||
y: parent.height - username.height / 3
|
y: parent.height - username.height / 3
|
||||||
x: config.RightToLeftLayout == "true" ? -loginButton.width + selectUser.width : 0
|
x: config.RightToLeftLayout == "true" ? (-loginButton.width + selectUser.width + selectUser.anchors.leftMargin) : 0 - selectUser.anchors.leftMargin
|
||||||
rightMargin: config.RightToLeftLayout == "true" ? root.padding + usernameField.width / 2 : undefined
|
rightMargin: config.RightToLeftLayout == "true" ? root.padding + usernameField.width / 2 : undefined
|
||||||
padding: 10
|
padding: rootHeightUnit * 0.75
|
||||||
|
|
||||||
contentItem: ListView {
|
contentItem: ListView {
|
||||||
implicitHeight: contentHeight + 20
|
implicitHeight: contentHeight + (rootHeightUnit * 1.5)
|
||||||
|
|
||||||
clip: true
|
clip: true
|
||||||
model: selectUser.popup.visible ? selectUser.delegateModel : null
|
model: selectUser.popup.visible ? selectUser.delegateModel : null
|
||||||
@@ -192,7 +205,7 @@ Column {
|
|||||||
}
|
}
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
radius: config.RoundCorners / 2
|
radius: (rootScaleUnit * config.RoundCorners) / 2
|
||||||
color: config.DropdownBackgroundColor
|
color: config.DropdownBackgroundColor
|
||||||
layer.enabled: true
|
layer.enabled: true
|
||||||
}
|
}
|
||||||
@@ -243,9 +256,12 @@ Column {
|
|||||||
id: username
|
id: username
|
||||||
|
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
height: root.font.pointSize * 3
|
height: rootHeightUnit * 3
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
font.pixelSize: rootFontSize * 1.33
|
||||||
horizontalAlignment: TextInput.AlignHCenter
|
horizontalAlignment: TextInput.AlignHCenter
|
||||||
|
leftPadding: selectUser.width
|
||||||
|
rightPadding: selectUser.width
|
||||||
z: 1
|
z: 1
|
||||||
|
|
||||||
text: config.ForceLastUser == "true" ? selectUser.displayText : null
|
text: config.ForceLastUser == "true" ? selectUser.displayText : null
|
||||||
@@ -266,8 +282,8 @@ Column {
|
|||||||
color: config.LoginFieldBackgroundColor
|
color: config.LoginFieldBackgroundColor
|
||||||
opacity: 0.2
|
opacity: 0.2
|
||||||
border.color: "transparent"
|
border.color: "transparent"
|
||||||
border.width: parent.activeFocus ? 2 : 1
|
border.width: parent.activeFocus ? (rootScaleUnit * 2) : (rootScaleUnit * 1)
|
||||||
radius: config.RoundCorners || 0
|
radius: rootScaleUnit * config.RoundCorners || 0
|
||||||
}
|
}
|
||||||
|
|
||||||
onAccepted: triggerLogin()
|
onAccepted: triggerLogin()
|
||||||
@@ -290,25 +306,30 @@ Column {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: passwordFieldSpacer
|
||||||
|
width: 1
|
||||||
|
height: passwordFieldTopMargin
|
||||||
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: passwordField
|
id: passwordField
|
||||||
|
|
||||||
height: root.font.pointSize * 4.5
|
height: password.height
|
||||||
width: parent.width / 2
|
width: parent.width / 2
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
id: passwordIcon
|
id: passwordIcon
|
||||||
|
|
||||||
|
width: parent.height
|
||||||
height: parent.height
|
height: parent.height
|
||||||
width: selectUser.height * 1
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: selectUser.height * 0
|
anchors.leftMargin: selectUser.height * 0.2
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
z: 2
|
z: 2
|
||||||
|
|
||||||
icon.height: parent.height * 0.25
|
icon.height: parent.height * 0.4
|
||||||
icon.width: parent.height * 0.25
|
icon.width: parent.height * 0.4
|
||||||
icon.color: config.PasswordIconColor
|
icon.color: config.PasswordIconColor
|
||||||
icon.source: Qt.resolvedUrl("../Assets/Password2.svg")
|
icon.source: Qt.resolvedUrl("../Assets/Password2.svg")
|
||||||
|
|
||||||
@@ -374,19 +395,22 @@ Column {
|
|||||||
TextField {
|
TextField {
|
||||||
id: password
|
id: password
|
||||||
|
|
||||||
height: root.font.pointSize * 3
|
height: rootHeightUnit * 3
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
font.pixelSize: rootFontSize * 1.33
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
horizontalAlignment: TextInput.AlignHCenter
|
horizontalAlignment: TextInput.AlignHCenter
|
||||||
|
leftPadding: passwordIcon.width
|
||||||
|
rightPadding: passwordIcon.width
|
||||||
|
|
||||||
font.bold: true
|
font.bold: true
|
||||||
color: config.PasswordFieldTextColor
|
color: config.PasswordFieldTextColor
|
||||||
focus: config.PasswordFocus == "true" ? true : false
|
focus: config.PasswordFocus == "true"
|
||||||
echoMode: passwordIcon.checked ? TextInput.Normal : TextInput.Password
|
echoMode: passwordIcon.checked ? TextInput.Normal : TextInput.Password
|
||||||
placeholderText: config.TranslatePlaceholderPassword || textConstants.password
|
placeholderText: config.TranslatePlaceholderPassword || textConstants.password
|
||||||
placeholderTextColor: config.PlaceholderTextColor
|
placeholderTextColor: config.PlaceholderTextColor
|
||||||
passwordCharacter: "•"
|
passwordCharacter: "•"
|
||||||
passwordMaskDelay: config.HideCompletePassword == "true" ? undefined : 1000
|
passwordMaskDelay: config.ShowLastPasswordCharacter == "true" ? 1000 : undefined
|
||||||
renderType: Text.QtRendering
|
renderType: Text.QtRendering
|
||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
|
|
||||||
@@ -394,8 +418,8 @@ Column {
|
|||||||
color: config.PasswordFieldBackgroundColor
|
color: config.PasswordFieldBackgroundColor
|
||||||
opacity: 0.2
|
opacity: 0.2
|
||||||
border.color: "transparent"
|
border.color: "transparent"
|
||||||
border.width: parent.activeFocus ? 2 : 1
|
border.width: parent.activeFocus ? (rootScaleUnit * 2) : (rootScaleUnit * 1)
|
||||||
radius: config.RoundCorners || 0
|
radius: rootScaleUnit * config.RoundCorners || 0
|
||||||
}
|
}
|
||||||
onAccepted: triggerLogin()
|
onAccepted: triggerLogin()
|
||||||
KeyNavigation.down: loginButton
|
KeyNavigation.down: loginButton
|
||||||
@@ -425,27 +449,31 @@ Column {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: loginButtonSpacer
|
||||||
|
width: 1
|
||||||
|
height: loginButtonTopMargin
|
||||||
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: login
|
id: login
|
||||||
|
|
||||||
// important
|
height: loginButton.height
|
||||||
// try 4 or 9 ...
|
|
||||||
height: root.font.pointSize * 9
|
|
||||||
width: parent.width / 2
|
width: parent.width / 2
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
visible: config.HideLoginButton == "true" ? false : true
|
visible: config.ShowLoginButton == "true"
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
id: loginButton
|
id: loginButton
|
||||||
|
|
||||||
height: root.font.pointSize * 3
|
height: rootHeightUnit * 3
|
||||||
implicitWidth: parent.width
|
implicitWidth: parent.width
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
text: config.TranslateLogin || textConstants.login
|
text: config.TranslateLogin || textConstants.login
|
||||||
enabled: config.AllowEmptyPassword == "true" || username.text != "" && password.text != "" ? true : false
|
enabled: config.AllowEmptyPassword == "true" || (username.text != "" && password.text != "")
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
|
|
||||||
contentItem: Text {
|
contentItem: Text {
|
||||||
@@ -453,7 +481,7 @@ Column {
|
|||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
|
||||||
font.bold: true
|
font.bold: true
|
||||||
font.pointSize: root.font.pointSize
|
font.pixelSize: rootFontSize * 1.33
|
||||||
font.family: root.font.family
|
font.family: root.font.family
|
||||||
color: config.LoginButtonTextColor
|
color: config.LoginButtonTextColor
|
||||||
text: parent.text
|
text: parent.text
|
||||||
@@ -465,7 +493,7 @@ Column {
|
|||||||
|
|
||||||
color: config.LoginButtonBackgroundColor
|
color: config.LoginButtonBackgroundColor
|
||||||
opacity: 0.2
|
opacity: 0.2
|
||||||
radius: config.RoundCorners || 0
|
radius: rootScaleUnit * config.RoundCorners || 0
|
||||||
}
|
}
|
||||||
|
|
||||||
states: [
|
states: [
|
||||||
@@ -534,7 +562,7 @@ Column {
|
|||||||
Keys.onReturnPressed: clicked()
|
Keys.onReturnPressed: clicked()
|
||||||
Keys.onEnterPressed: clicked()
|
Keys.onEnterPressed: clicked()
|
||||||
|
|
||||||
KeyNavigation.down: config.HideSystemButtons == "true" ? virtualKeyboard : systemButtons.children[0]
|
KeyNavigation.down: config.ShowSystemButtons == "true" ? systemButtons.children[0] : virtualKeyboard
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -548,7 +576,7 @@ Column {
|
|||||||
Item {
|
Item {
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
var currentList = userRegistry.list
|
var currentList = userRegistry.list
|
||||||
currentList.push({ "name": model.name, "realName": model.realName || "" })
|
currentList.push({ "name": model.name, "realName": model.realName || "", "icon": model.icon || "" })
|
||||||
userRegistry.list = currentList
|
userRegistry.list = currentList
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+106
-47
@@ -1,63 +1,122 @@
|
|||||||
// Config created by Keyitdev https://github.com/Keyitdev/sddm-astronaut-theme
|
// Config created by Keyitdev https://github.com/Keyitdev/sddm-astronaut-theme
|
||||||
// Copyright (C) 2022-2025 Keyitdev
|
// Copyright (C) 2022-2026 Keyitdev
|
||||||
// Based on https://github.com/MarianArlt/sddm-sugar-dark
|
// Based on https://github.com/MarianArlt/sddm-sugar-dark
|
||||||
// Distributed under the GPLv3+ License https://www.gnu.org/licenses/gpl-3.0.html
|
// Distributed under the GPLv3+ License https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
import SddmComponents 2.0 as SDDM
|
import SddmComponents 2.0 as SDDM
|
||||||
|
|
||||||
ColumnLayout {
|
Item {
|
||||||
id: formContainer
|
id: formContainer
|
||||||
SDDM.TextConstants { id: textConstants }
|
SDDM.TextConstants { id: textConstants }
|
||||||
|
|
||||||
property int p: config.ScreenPadding == "" ? 0 : config.ScreenPadding
|
readonly property real clockTopMargin: (Number(config.ClockTopMargin) || 0) * rootHeightUnit
|
||||||
property string a: config.FormPosition
|
readonly property real profilePictureTopMargin: (Number(config.ProfilePictureTopMargin) || 0) * rootHeightUnit
|
||||||
|
readonly property real loginInputTopMargin: (Number(config.LoginInputTopMargin) || 0) * rootHeightUnit
|
||||||
|
readonly property real systemButtonsBottomMargin: (Number(config.SystemButtonsBottomMargin) || 0) * rootHeightUnit
|
||||||
|
readonly property real sessionSelectBottomMargin: (Number(config.SessionSelectBottomMargin) || 0) * rootHeightUnit
|
||||||
|
readonly property real virtualKeyboardButtonBottomMargin: (Number(config.VirtualKeyboardButtonBottomMargin) || 0) * rootHeightUnit
|
||||||
|
|
||||||
Clock {
|
ColumnLayout {
|
||||||
id: clock
|
id: topGroup
|
||||||
|
spacing: 0
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
Rectangle {
|
||||||
// important
|
id: clockBox
|
||||||
Layout.preferredHeight: root.height / 3
|
color: "transparent"
|
||||||
Layout.leftMargin: p != "0" ? a == "left" ? -p : a == "right" ? p : 0 : 0
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
Layout.topMargin: clockTopMargin
|
||||||
|
Layout.preferredHeight: clock.implicitHeight + (rootHeightUnit * 1.5)
|
||||||
|
implicitWidth: clock.implicitWidth + (rootWidthUnit * 3)
|
||||||
|
radius: 20
|
||||||
|
Layout.preferredWidth: implicitWidth
|
||||||
|
Clock {
|
||||||
|
anchors.fill: parent
|
||||||
|
id: clock
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Rectangle {
|
||||||
|
id: profilePictureBox
|
||||||
|
color: "transparent"
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
Layout.topMargin: profilePictureTopMargin
|
||||||
|
Layout.preferredHeight: profilePicture.height
|
||||||
|
implicitWidth: profilePicture.width + (rootWidthUnit * 3)
|
||||||
|
Layout.preferredWidth: implicitWidth
|
||||||
|
ProfilePicture {
|
||||||
|
id: profilePicture
|
||||||
|
visible: config.ShowProfilePicture == "true"
|
||||||
|
anchors.centerIn: parent
|
||||||
|
width: rootHeightUnit * 11
|
||||||
|
height: rootHeightUnit * 11
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Rectangle {
|
||||||
|
id: inputBox
|
||||||
|
color: "transparent"
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
Layout.topMargin: loginInputTopMargin
|
||||||
|
Layout.preferredHeight: input.implicitHeight
|
||||||
|
implicitWidth: input.implicitWidth
|
||||||
|
Layout.preferredWidth: implicitWidth
|
||||||
|
Input {
|
||||||
|
id: input
|
||||||
|
anchors.centerIn: parent
|
||||||
|
width: rootWidthUnit * 65
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Input {
|
ColumnLayout {
|
||||||
id: input
|
id: bottomGroup
|
||||||
|
spacing: 0
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Rectangle {
|
||||||
Layout.preferredHeight: root.height / 10
|
id: systemButtonsBox
|
||||||
Layout.leftMargin: p != "0" ? a == "left" ? -p : a == "right" ? p : 0 : 0
|
color: "transparent"
|
||||||
Layout.topMargin: 0
|
Layout.alignment: Qt.AlignHCenter
|
||||||
}
|
Layout.bottomMargin: systemButtonsBottomMargin
|
||||||
|
Layout.preferredHeight: systemButtons.implicitHeight
|
||||||
SystemButtons {
|
implicitWidth: systemButtons.implicitWidth
|
||||||
id: systemButtons
|
Layout.preferredWidth: implicitWidth
|
||||||
|
SystemButtons {
|
||||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
id: systemButtons
|
||||||
Layout.preferredHeight: root.height / 5
|
anchors.centerIn: parent
|
||||||
Layout.maximumHeight: root.height / 5
|
}
|
||||||
Layout.leftMargin: p != "0" ? a == "left" ? -p : a == "right" ? p : 0 : 0
|
}
|
||||||
|
Rectangle {
|
||||||
exposedSession: input.exposeSession
|
id: sessionSelectBox
|
||||||
}
|
color: "transparent"
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
SessionButton {
|
Layout.bottomMargin: sessionSelectBottomMargin
|
||||||
id: sessionSelect
|
Layout.preferredHeight: sessionSelect.height
|
||||||
|
implicitWidth: sessionSelect.width
|
||||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
Layout.preferredWidth: implicitWidth
|
||||||
Layout.preferredHeight: root.height / 54
|
SessionButton {
|
||||||
Layout.maximumHeight: root.height / 54
|
id: sessionSelect
|
||||||
Layout.leftMargin: p != "0" ? a == "left" ? -p : a == "right" ? p : 0 : 0
|
anchors.centerIn: parent
|
||||||
}
|
width: rootWidthUnit * 32.5
|
||||||
|
}
|
||||||
VirtualKeyboardButton {
|
}
|
||||||
id: virtualKeyboardButton
|
Rectangle {
|
||||||
|
id: virtualKeyboardButtonBox
|
||||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
color: "transparent"
|
||||||
Layout.preferredHeight: root.height / 27
|
Layout.alignment: Qt.AlignHCenter
|
||||||
Layout.maximumHeight: root.height / 27
|
Layout.bottomMargin: virtualKeyboardButtonBottomMargin
|
||||||
Layout.leftMargin: p != "0" ? a == "left" ? -p : a == "right" ? p : 0 : 0
|
Layout.preferredHeight: virtualKeyboardButton.height
|
||||||
|
implicitWidth: virtualKeyboardButton.width
|
||||||
|
Layout.preferredWidth: implicitWidth
|
||||||
|
VirtualKeyboardButton {
|
||||||
|
id: virtualKeyboardButton
|
||||||
|
anchors.centerIn: parent
|
||||||
|
width: rootWidthUnit * 32.5
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,61 @@
|
|||||||
|
// Config created by Keyitdev https://github.com/Keyitdev/sddm-astronaut-theme
|
||||||
|
// Copyright (C) 2022-2026 Keyitdev
|
||||||
|
// Distributed under the GPLv3+ License https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
|
import QtQuick
|
||||||
|
import QtQuick.Effects
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: profilePicture
|
||||||
|
|
||||||
|
property url userIcon: input.currentUserIcon
|
||||||
|
property bool hasCustomIcon: userIcon != ""
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors.fill: avatarImage
|
||||||
|
radius: width / 2
|
||||||
|
color: config.ProfilePictureBorderColor
|
||||||
|
opacity: 0.2
|
||||||
|
z: -1
|
||||||
|
}
|
||||||
|
|
||||||
|
Image {
|
||||||
|
id: avatarImage
|
||||||
|
|
||||||
|
anchors.fill: parent
|
||||||
|
anchors.margins: ringBorder.border.width
|
||||||
|
source: hasCustomIcon ? profilePicture.userIcon : Qt.resolvedUrl("../Assets/User.svg")
|
||||||
|
fillMode: hasCustomIcon ? Image.PreserveAspectCrop : Image.PreserveAspectFit
|
||||||
|
smooth: true
|
||||||
|
mipmap: true
|
||||||
|
asynchronous: true
|
||||||
|
visible: false
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: circleMask
|
||||||
|
|
||||||
|
anchors.fill: avatarImage
|
||||||
|
radius: rootScaleUnit * config.ProfilePictureRoundedCorners || 0
|
||||||
|
visible: false
|
||||||
|
layer.enabled: true
|
||||||
|
}
|
||||||
|
|
||||||
|
MultiEffect {
|
||||||
|
anchors.fill: avatarImage
|
||||||
|
source: avatarImage
|
||||||
|
maskEnabled: true
|
||||||
|
maskSource: circleMask
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: ringBorder
|
||||||
|
|
||||||
|
anchors.fill: parent
|
||||||
|
radius: rootScaleUnit * config.ProfilePictureRoundedCorners || 0
|
||||||
|
color: "transparent"
|
||||||
|
border.width: rootScaleUnit * config.ProfilePictureBorderWidth || 2
|
||||||
|
border.color: config.ProfilePictureBorderColor
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,28 +1,25 @@
|
|||||||
// Config created by Keyitdev https://github.com/Keyitdev/sddm-astronaut-theme
|
// Config created by Keyitdev https://github.com/Keyitdev/sddm-astronaut-theme
|
||||||
// Copyright (C) 2022-2025 Keyitdev
|
// Copyright (C) 2022-2026 Keyitdev
|
||||||
// Based on https://github.com/MarianArlt/sddm-sugar-dark
|
// Based on https://github.com/MarianArlt/sddm-sugar-dark
|
||||||
// Distributed under the GPLv3+ License https://www.gnu.org/licenses/gpl-3.0.html
|
// Distributed under the GPLv3+ License https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: sessionButton
|
id: sessionButton
|
||||||
|
|
||||||
height: root.font.pointSize
|
height: selectSession.height
|
||||||
width: parent.width / 2
|
width: parent.width / 2
|
||||||
|
|
||||||
property var selectedSession: selectSession.currentIndex
|
property var selectedSession: selectSession.currentIndex
|
||||||
property string textConstantSession
|
|
||||||
property int loginButtonWidth
|
|
||||||
property ComboBox exposeSession: selectSession
|
property ComboBox exposeSession: selectSession
|
||||||
|
|
||||||
ComboBox {
|
ComboBox {
|
||||||
id: selectSession
|
id: selectSession
|
||||||
|
|
||||||
// important
|
height: rootHeightUnit
|
||||||
// change also in errorMessage
|
width: parent.width
|
||||||
height: root.font.pointSize * 2
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
@@ -38,15 +35,20 @@ Item {
|
|||||||
|
|
||||||
delegate: ItemDelegate {
|
delegate: ItemDelegate {
|
||||||
// minus padding
|
// minus padding
|
||||||
width: popupHandler.width - 20
|
width: popupHandler.width - (rootScaleUnit * 20)
|
||||||
anchors.horizontalCenter: popupHandler.horizontalCenter
|
anchors.horizontalCenter: popupHandler.horizontalCenter
|
||||||
|
|
||||||
|
topPadding: rootScaleUnit * 6
|
||||||
|
bottomPadding: rootScaleUnit * 6
|
||||||
|
leftPadding: rootScaleUnit * 12
|
||||||
|
rightPadding: rootScaleUnit * 12
|
||||||
|
|
||||||
contentItem: Text {
|
contentItem: Text {
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
|
||||||
text: model.name
|
text: model.name
|
||||||
font.pointSize: root.font.pointSize * 0.8
|
font.pixelSize: rootFontSize * 1.06
|
||||||
font.family: root.font.family
|
font.family: root.font.family
|
||||||
color: config.DropdownTextColor
|
color: config.DropdownTextColor
|
||||||
}
|
}
|
||||||
@@ -64,18 +66,19 @@ Item {
|
|||||||
id: displayedItem
|
id: displayedItem
|
||||||
|
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
|
||||||
text: (config.TranslateSessionSelection || "Session") + " (" + selectSession.currentText + ")"
|
text: (config.TranslateSessionSelection || "Session") + " (" + selectSession.currentText + ")"
|
||||||
color: config.SessionButtonTextColor
|
color: config.SessionButtonTextColor
|
||||||
font.pointSize: root.font.pointSize * 0.8
|
font.pixelSize: rootFontSize * 1.06
|
||||||
font.family: root.font.family
|
font.family: root.font.family
|
||||||
|
|
||||||
Keys.onReleased: parent.popup.open()
|
Keys.onReleased: parent.popup.open()
|
||||||
}
|
}
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
height: parent.visualFocus ? 2 : 0
|
height: parent.visualFocus ? (rootScaleUnit * 2) : 0
|
||||||
width: displayedItem.implicitWidth
|
width: parent.width
|
||||||
|
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
}
|
}
|
||||||
@@ -85,12 +88,12 @@ Item {
|
|||||||
|
|
||||||
implicitHeight: contentItem.implicitHeight
|
implicitHeight: contentItem.implicitHeight
|
||||||
width: sessionButton.width
|
width: sessionButton.width
|
||||||
y: parent.height - 1
|
y: parent.height + rootHeightUnit
|
||||||
x: -popupHandler.width/2 + displayedItem.width/2
|
x: 0
|
||||||
padding: 10
|
padding: rootScaleUnit * 10
|
||||||
|
|
||||||
contentItem: ListView {
|
contentItem: ListView {
|
||||||
implicitHeight: contentHeight + 20
|
implicitHeight: contentHeight + (rootScaleUnit * 20)
|
||||||
|
|
||||||
clip: true
|
clip: true
|
||||||
model: selectSession.popup.visible ? selectSession.delegateModel : null
|
model: selectSession.popup.visible ? selectSession.delegateModel : null
|
||||||
@@ -99,7 +102,7 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
radius: config.RoundCorners / 2
|
radius: (rootScaleUnit * config.RoundCorners) / 2
|
||||||
color: config.DropdownBackgroundColor
|
color: config.DropdownBackgroundColor
|
||||||
layer.enabled: true
|
layer.enabled: true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,81 +1,77 @@
|
|||||||
// Config created by Keyitdev https://github.com/Keyitdev/sddm-astronaut-theme
|
// Config created by Keyitdev https://github.com/Keyitdev/sddm-astronaut-theme
|
||||||
// Copyright (C) 2022-2025 Keyitdev
|
// Copyright (C) 2022-2026 Keyitdev
|
||||||
// Based on https://github.com/MarianArlt/sddm-sugar-dark
|
// Based on https://github.com/MarianArlt/sddm-sugar-dark
|
||||||
// Distributed under the GPLv3+ License https://www.gnu.org/licenses/gpl-3.0.html
|
// Distributed under the GPLv3+ License https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
|
spacing: rootFontSize
|
||||||
spacing: root.font.pointSize
|
|
||||||
|
|
||||||
property var shutdown: ["Shutdown", config.TranslateShutdown || textConstants.shutdown, sddm.canPowerOff]
|
property var shutdown: ["Shutdown", config.TranslateShutdown || textConstants.shutdown, sddm.canPowerOff]
|
||||||
property var reboot: ["Reboot", config.TranslateReboot || textConstants.reboot, sddm.canReboot]
|
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 ComboBox exposedSession
|
|
||||||
|
|
||||||
Repeater {
|
Repeater {
|
||||||
id: systemButtons
|
id: systemButtons
|
||||||
|
|
||||||
model: [shutdown, reboot, suspend, hibernate]
|
model: [shutdown, reboot, suspend, hibernate]
|
||||||
|
|
||||||
RoundButton {
|
RoundButton {
|
||||||
|
id: sysButton
|
||||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
||||||
Layout.topMargin: root.font.pointSize * 6.5
|
|
||||||
|
|
||||||
text: modelData[1]
|
text: modelData[1]
|
||||||
font.pointSize: root.font.pointSize * 0.8
|
font.pixelSize: rootFontSize * 1.06
|
||||||
icon.source: modelData ? Qt.resolvedUrl("../Assets/" + modelData[0] + ".svg") : ""
|
icon.source: Qt.resolvedUrl("../Assets/" + modelData[0] + ".svg")
|
||||||
icon.height: 2 * Math.round((root.font.pointSize * 3) / 2)
|
icon.height: 2 * Math.round((rootFontSize * 3) / 2)
|
||||||
icon.width: 2 * Math.round((root.font.pointSize * 3) / 2)
|
icon.width: 2 * Math.round((rootFontSize * 3) / 2)
|
||||||
icon.color: config.SystemButtonsIconsColor
|
icon.color: config.SystemButtonsIconsColor
|
||||||
palette.buttonText: config.SystemButtonsIconsColor
|
palette.buttonText: config.SystemButtonsIconsColor
|
||||||
display: AbstractButton.TextUnderIcon
|
display: AbstractButton.TextUnderIcon
|
||||||
visible: config.HideSystemButtons != "true" && (config.BypassSystemButtonsChecks == "true" ? 1 : modelData[2])
|
spacing: rootScaleUnit * 6
|
||||||
|
padding: rootScaleUnit * 8
|
||||||
|
visible: config.ShowSystemButtons == "true" && (config.BypassSystemButtonsChecks == "true" || modelData[2])
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
height: 2
|
height: rootScaleUnit * 2
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
}
|
}
|
||||||
|
|
||||||
Keys.onReturnPressed: clicked()
|
Keys.onReturnPressed: clicked()
|
||||||
onClicked: {
|
onClicked: {
|
||||||
parent.forceActiveFocus()
|
parent.forceActiveFocus()
|
||||||
index == 0 ? sddm.powerOff() : index == 1 ? sddm.reboot() : index == 2 ? sddm.suspend() : sddm.hibernate()
|
switch (index) {
|
||||||
|
case 0: sddm.powerOff(); break
|
||||||
|
case 1: sddm.reboot(); break
|
||||||
|
case 2: sddm.suspend(); break
|
||||||
|
default: sddm.hibernate()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
KeyNavigation.left: index > 0 ? parent.children[index-1] : null
|
KeyNavigation.left: index > 0 ? parent.children[index-1] : null
|
||||||
|
|
||||||
states: [
|
states: [
|
||||||
State {
|
State {
|
||||||
name: "pressed"
|
name: "pressed"
|
||||||
when: parent.children[index].down
|
when: sysButton.down
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: parent.children[index]
|
target: sysButton
|
||||||
icon.color: root.palette.buttonText
|
icon.color: root.palette.buttonText
|
||||||
palette.buttonText: Qt.darker(root.palette.buttonText, 1.1)
|
palette.buttonText: Qt.darker(root.palette.buttonText, 1.1)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
State {
|
State {
|
||||||
name: "hovered"
|
name: "hovered"
|
||||||
when: parent.children[index].hovered
|
when: sysButton.hovered
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: parent.children[index]
|
target: sysButton
|
||||||
icon.color: root.palette.buttonText
|
icon.color: root.palette.buttonText
|
||||||
palette.buttonText: Qt.lighter(root.palette.buttonText, 1.1)
|
palette.buttonText: Qt.lighter(root.palette.buttonText, 1.1)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
State {
|
State {
|
||||||
name: "focused"
|
name: "focused"
|
||||||
when: parent.children[index].activeFocus
|
when: sysButton.activeFocus
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: parent.children[index]
|
target: sysButton
|
||||||
icon.color: root.palette.buttonText
|
icon.color: root.palette.buttonText
|
||||||
palette.buttonText: root.palette.buttonText
|
palette.buttonText: root.palette.buttonText
|
||||||
}
|
}
|
||||||
@@ -89,9 +85,6 @@ RowLayout {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
// Config created by Keyitdev https://github.com/Keyitdev/sddm-astronaut-theme
|
// Config created by Keyitdev https://github.com/Keyitdev/sddm-astronaut-theme
|
||||||
// Copyright (C) 2022-2025 Keyitdev
|
// Copyright (C) 2022-2026 Keyitdev
|
||||||
// Based on https://github.com/MarianArlt/sddm-sugar-dark
|
// Based on https://github.com/MarianArlt/sddm-sugar-dark
|
||||||
// Distributed under the GPLv3+ License https://www.gnu.org/licenses/gpl-3.0.html
|
// Distributed under the GPLv3+ License https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.VirtualKeyboard 2.3
|
import QtQuick.VirtualKeyboard
|
||||||
|
|
||||||
InputPanel {
|
InputPanel {
|
||||||
id: virtualKeyboard
|
id: virtualKeyboard
|
||||||
|
|||||||
@@ -1,18 +1,24 @@
|
|||||||
// Config created by Keyitdev https://github.com/Keyitdev/sddm-astronaut-theme
|
// Config created by Keyitdev https://github.com/Keyitdev/sddm-astronaut-theme
|
||||||
// Copyright (C) 2022-2025 Keyitdev
|
// Copyright (C) 2022-2026 Keyitdev
|
||||||
// Distributed under the GPLv3+ License https://www.gnu.org/licenses/gpl-3.0.html
|
// Distributed under the GPLv3+ License https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Controls 2.15
|
import QtQuick.Controls
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
id: virtualKeyboardButtonRoot
|
||||||
|
|
||||||
|
height: virtualKeyboardButton.height
|
||||||
|
width: parent.width / 2
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
id: virtualKeyboardButton
|
id: virtualKeyboardButton
|
||||||
|
height: rootHeightUnit
|
||||||
|
width: parent.width
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
z: 1
|
z: 1
|
||||||
|
|
||||||
visible: virtualKeyboard.status == Loader.Ready && config.HideVirtualKeyboard == "false"
|
visible: virtualKeyboard.status == Loader.Ready && config.ShowVirtualKeyboard == "true"
|
||||||
checkable: true
|
checkable: true
|
||||||
onClicked: virtualKeyboard.switchState()
|
onClicked: virtualKeyboard.switchState()
|
||||||
|
|
||||||
@@ -28,8 +34,11 @@ Item {
|
|||||||
contentItem: Text {
|
contentItem: Text {
|
||||||
id: virtualKeyboardButtonText
|
id: virtualKeyboardButtonText
|
||||||
|
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
|
||||||
text: config.TranslateVirtualKeyboardButtonOff || "Virtual Keyboard (off)"
|
text: config.TranslateVirtualKeyboardButtonOff || "Virtual Keyboard (off)"
|
||||||
font.pointSize: root.font.pointSize * 0.8
|
font.pixelSize: rootFontSize * 1.06
|
||||||
font.family: root.font.family
|
font.family: root.font.family
|
||||||
color: parent.visualFocus ? config.HoverVirtualKeyboardButtonTextColor : config.VirtualKeyboardButtonTextColor
|
color: parent.visualFocus ? config.HoverVirtualKeyboardButtonTextColor : config.VirtualKeyboardButtonTextColor
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
// Config created by Keyitdev https://github.com/Keyitdev/sddm-astronaut-theme
|
// Config created by Keyitdev https://github.com/Keyitdev/sddm-astronaut-theme
|
||||||
// Copyright (C) 2022-2025 Keyitdev
|
// Copyright (C) 2022-2026 Keyitdev
|
||||||
// Based on https://github.com/MarianArlt/sddm-sugar-dark
|
// Based on https://github.com/MarianArlt/sddm-sugar-dark
|
||||||
// Distributed under the GPLv3+ License https://www.gnu.org/licenses/gpl-3.0.html
|
// Distributed under the GPLv3+ License https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
import QtQuick 2.15
|
import QtQuick
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Controls
|
||||||
import QtQuick.Controls 2.15
|
|
||||||
import QtQuick.Effects
|
import QtQuick.Effects
|
||||||
import QtMultimedia
|
import QtMultimedia
|
||||||
|
|
||||||
@@ -14,8 +13,8 @@ import "Components"
|
|||||||
Pane {
|
Pane {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
height: config.ScreenHeight || Screen.height
|
height: Screen.height
|
||||||
width: config.ScreenWidth || Screen.ScreenWidth
|
width: Screen.width
|
||||||
padding: config.ScreenPadding
|
padding: config.ScreenPadding
|
||||||
|
|
||||||
LayoutMirroring.enabled: config.RightToLeftLayout == "true" ? true : Qt.application.layoutDirection === Qt.RightToLeft
|
LayoutMirroring.enabled: config.RightToLeftLayout == "true" ? true : Qt.application.layoutDirection === Qt.RightToLeft
|
||||||
@@ -27,27 +26,36 @@ Pane {
|
|||||||
palette.buttonText: config.HoverSystemButtonsIconsColor
|
palette.buttonText: config.HoverSystemButtonsIconsColor
|
||||||
|
|
||||||
font.family: config.Font
|
font.family: config.Font
|
||||||
font.pointSize: config.FontSize !== "" ? config.FontSize : parseInt(height / 80) || 13
|
|
||||||
|
function safeOffset(val) {
|
||||||
|
var n = Number(val)
|
||||||
|
return (val === "" || val === undefined || val === null || isNaN(n)) ? 0 : n
|
||||||
|
}
|
||||||
|
|
||||||
|
property real rootFontSize: (config.FontSize !== "" && config.FontSize !== undefined ? Number(config.FontSize) : (height / 90)) + safeOffset(config.FontSizeOffset)
|
||||||
|
property real rootHeightUnit: (config.HeightUnit !== "" && config.HeightUnit !== undefined ? Number(config.HeightUnit) : (height / 90)) + safeOffset(config.HeightUnitOffset)
|
||||||
|
property real rootWidthUnit: (config.WidthUnit !== "" && config.WidthUnit !== undefined ? Number(config.WidthUnit) : (width / 160)) + safeOffset(config.WidthUnitOffset)
|
||||||
|
property real rootScaleUnit: (config.ScaleUnit !== "" && config.ScaleUnit !== undefined ? Number(config.ScaleUnit) : (height / 1080)) + safeOffset(config.ScaleUnitOffset)
|
||||||
|
|
||||||
focus: true
|
focus: true
|
||||||
|
|
||||||
property bool leftleft: config.HaveFormBackground == "true" &&
|
property bool leftleft: config.HaveFormBackground == "true" &&
|
||||||
config.PartialBlur == "false" &&
|
config.PartialBlur != "true" &&
|
||||||
config.FormPosition == "left" &&
|
config.FormPosition == "left" &&
|
||||||
config.BackgroundHorizontalAlignment == "left"
|
config.BackgroundHorizontalAlignment == "left"
|
||||||
|
|
||||||
property bool leftcenter: config.HaveFormBackground == "true" &&
|
property bool leftcenter: config.HaveFormBackground == "true" &&
|
||||||
config.PartialBlur == "false" &&
|
config.PartialBlur != "true" &&
|
||||||
config.FormPosition == "left" &&
|
config.FormPosition == "left" &&
|
||||||
config.BackgroundHorizontalAlignment == "center"
|
config.BackgroundHorizontalAlignment == "center"
|
||||||
|
|
||||||
property bool rightright: config.HaveFormBackground == "true" &&
|
property bool rightright: config.HaveFormBackground == "true" &&
|
||||||
config.PartialBlur == "false" &&
|
config.PartialBlur != "true" &&
|
||||||
config.FormPosition == "right" &&
|
config.FormPosition == "right" &&
|
||||||
config.BackgroundHorizontalAlignment == "right"
|
config.BackgroundHorizontalAlignment == "right"
|
||||||
|
|
||||||
property bool rightcenter: config.HaveFormBackground == "true" &&
|
property bool rightcenter: config.HaveFormBackground == "true" &&
|
||||||
config.PartialBlur == "false" &&
|
config.PartialBlur != "true" &&
|
||||||
config.FormPosition == "right" &&
|
config.FormPosition == "right" &&
|
||||||
config.BackgroundHorizontalAlignment == "center"
|
config.BackgroundHorizontalAlignment == "center"
|
||||||
|
|
||||||
@@ -77,7 +85,7 @@ Pane {
|
|||||||
z: 1
|
z: 1
|
||||||
|
|
||||||
color: config.FormBackgroundColor
|
color: config.FormBackgroundColor
|
||||||
visible: config.HaveFormBackground == "true" ? true : false
|
visible: config.HaveFormBackground == "true"
|
||||||
opacity: config.PartialBlur == "true" ? 0.3 : 1
|
opacity: config.PartialBlur == "true" ? 0.3 : 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -227,7 +235,7 @@ Pane {
|
|||||||
Image.AlignBottom : Image.AlignVCenter
|
Image.AlignBottom : Image.AlignVCenter
|
||||||
|
|
||||||
speed: config.BackgroundSpeed == "" ? 1.0 : config.BackgroundSpeed
|
speed: config.BackgroundSpeed == "" ? 1.0 : config.BackgroundSpeed
|
||||||
paused: config.PauseBackground == "true" ? 1 : 0
|
paused: config.PauseBackground == "true"
|
||||||
fillMode: config.CropBackground == "true" ? Image.PreserveAspectCrop : Image.PreserveAspectFit
|
fillMode: config.CropBackground == "true" ? Image.PreserveAspectCrop : Image.PreserveAspectFit
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
cache: true
|
cache: true
|
||||||
@@ -243,7 +251,7 @@ Pane {
|
|||||||
player.play();
|
player.play();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
backgroundImage.source = config.background || config.Background
|
backgroundImage.source = config.Background
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -262,27 +270,33 @@ Pane {
|
|||||||
|
|
||||||
sourceItem: backgroundImage
|
sourceItem: backgroundImage
|
||||||
sourceRect: Qt.rect(x,y,width,height)
|
sourceRect: Qt.rect(x,y,width,height)
|
||||||
visible: config.FullBlur == "true" || config.PartialBlur == "true" ? true : false
|
visible: config.FullBlur == "true" || config.PartialBlur == "true"
|
||||||
}
|
}
|
||||||
|
|
||||||
MultiEffect {
|
MultiEffect {
|
||||||
id: blur
|
id: blur
|
||||||
|
|
||||||
height: parent.height
|
height: parent.height
|
||||||
|
|
||||||
// width: config.FullBlur == "true" ? parent.width : form.width
|
// width: config.FullBlur == "true" ? parent.width : form.width
|
||||||
// anchors.centerIn: config.FullBlur == "true" ? parent : form
|
// anchors.centerIn: config.FullBlur == "true" ? parent : form
|
||||||
|
|
||||||
// This solves problem when FullBlur and HaveFormBackground is set to true but PartialBlur is false and FormPosition isn't center.
|
// This solves problem when FullBlur and HaveFormBackground is set to true but PartialBlur is false and FormPosition isn't center.
|
||||||
width: (config.FullBlur == "true" && config.PartialBlur == "false" && config.FormPosition != "center" ) ? parent.width - formBackground.width : config.FullBlur == "true" ? parent.width : form.width
|
width: config.FullBlur == "true" ? (config.HaveFormBackground == "true" && config.PartialBlur != "true" && config.FormPosition != "center" ? parent.width - formBackground.width : parent.width) : form.width
|
||||||
anchors.centerIn: config.FullBlur == "true" ? backgroundImage : form
|
anchors.centerIn: config.FullBlur == "true" ? backgroundImage : form
|
||||||
|
|
||||||
source: config.FullBlur == "true" ? backgroundImage : blurMask
|
source: config.FullBlur == "true" ? backgroundImage : blurMask
|
||||||
blurEnabled: true
|
blurEnabled: true
|
||||||
autoPaddingEnabled: false
|
autoPaddingEnabled: false
|
||||||
blur: config.Blur == "" ? 2.0 : config.Blur
|
|
||||||
blurMax: config.BlurMax == "" ? 48 : config.BlurMax
|
property real parsedBlur: config.Blur === "" ? 2.0 : parseFloat(config.Blur)
|
||||||
visible: config.FullBlur == "true" || config.PartialBlur == "true" ? true : false
|
property real scaledBlur: parsedBlur * root.rootScaleUnit
|
||||||
}
|
|
||||||
|
blur: Math.min(1.0, scaledBlur)
|
||||||
|
blurMax: config.BlurMax !== "" ? parseInt(config.BlurMax, 10) : 48
|
||||||
|
blurMultiplier: Math.max(0.0, scaledBlur - 1.0)
|
||||||
|
|
||||||
|
visible: config.FullBlur == "true" || config.PartialBlur == "true"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ Author=keyitdev
|
|||||||
Website=https://github.com/Keyitdev/sddm-astronaut-theme
|
Website=https://github.com/Keyitdev/sddm-astronaut-theme
|
||||||
License=GPL-3.0-or-later
|
License=GPL-3.0-or-later
|
||||||
Type=sddm-theme
|
Type=sddm-theme
|
||||||
Version=1.4
|
Version=1.5
|
||||||
ConfigFile=Themes/astronaut.conf
|
ConfigFile=Themes/astronaut.conf
|
||||||
Screenshot=Previews/astronaut.png
|
Screenshot=Previews/astronaut.png
|
||||||
MainScript=Main.qml
|
MainScript=Main.qml
|
||||||
|
|||||||
@@ -181,19 +181,8 @@ _disable_dm_dinit() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
_runit_sv() {
|
|
||||||
if [ -d /etc/sv ]; then echo "/etc/sv"
|
|
||||||
elif [ -d /etc/runit/sv ]; then echo "/etc/runit/sv"
|
|
||||||
else
|
|
||||||
error "Cannot find runit service configuration files directory"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
_runit_runsvdir() {
|
_runit_runsvdir() {
|
||||||
if [ -d /service ]; then echo "/service" # legacy/upstream symlink
|
if [ -d /run/runit/service ]; then echo "/run/runit/service"
|
||||||
elif [ -d /var/service ]; then echo "/var/service"
|
|
||||||
elif [ -d /run/runit/service ]; then echo "/run/runit/service"
|
|
||||||
elif [ -d /etc/runit/runsvdir/default ]; then echo "/etc/runit/runsvdir/default"
|
elif [ -d /etc/runit/runsvdir/default ]; then echo "/etc/runit/runsvdir/default"
|
||||||
else
|
else
|
||||||
error "Cannot find runit service directory"
|
error "Cannot find runit service directory"
|
||||||
@@ -241,23 +230,16 @@ enable_sddm() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
runit)
|
runit)
|
||||||
local sv
|
|
||||||
local runsvdir
|
local runsvdir
|
||||||
sv=$(_runit_sv)
|
|
||||||
runsvdir=$(_runit_runsvdir)
|
runsvdir=$(_runit_runsvdir)
|
||||||
|
|
||||||
if [ -f /etc/os-release ] && grep -q 'ID=artix' /etc/os-release; then
|
if [ ! -d /etc/sv/sddm ]; then
|
||||||
sudo pacman --needed -S sddm-runit
|
error "/etc/sv/sddm not found - is sddm-runit (or equivalent) installed?"
|
||||||
info "sddm-runit installed for Artix Linux"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -d "$sv/sddm" ]; then
|
|
||||||
error "$sv/sddm not found - is sddm-runit (or equivalent) installed?"
|
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_disable_dm_runit
|
_disable_dm_runit
|
||||||
sudo ln -sf "$sv/sddm" "$runsvdir/"
|
sudo ln -sf /etc/sv/sddm "$runsvdir/sddm"
|
||||||
info "sddm symlinked into $runsvdir"
|
info "sddm symlinked into $runsvdir"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@@ -286,7 +268,7 @@ enable_sddm() {
|
|||||||
echo ""
|
echo ""
|
||||||
echo " systemd - sudo systemctl enable --now sddm"
|
echo " systemd - sudo systemctl enable --now sddm"
|
||||||
echo " openrc - sudo rc-update add sddm default"
|
echo " openrc - sudo rc-update add sddm default"
|
||||||
echo " runit - sudo ln -s /etc/sv/sddm /var/service/ || sudo ln -s /etc/runit/sv/sddm /run/runit/service/"
|
echo " runit - sudo ln -s /etc/sv/sddm /run/runit/service/"
|
||||||
echo " dinit - sudo ln -s /etc/dinit.d/sddm /etc/dinit.d/boot.d/sddm"
|
echo " dinit - sudo ln -s /etc/dinit.d/sddm /etc/dinit.d/boot.d/sddm"
|
||||||
return 1
|
return 1
|
||||||
;;
|
;;
|
||||||
|
|||||||
Reference in New Issue
Block a user