mirror of
https://github.com/Keyitdev/sddm-astronaut-theme.git
synced 2026-09-24 02:22:09 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
abb3163c72 | ||
|
|
b5fac9358f | ||
|
|
8fb1c72df5 | ||
|
|
d3b6cbbddd |
@@ -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-2026 Keyitdev
|
// Copyright (C) 2022-2025 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
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls 2.15
|
||||||
|
|
||||||
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.pixelSize: rootFontSize * 4
|
font.pointSize: root.font.pointSize * 3
|
||||||
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.pixelSize: rootFontSize * 12
|
font.pointSize: root.font.pointSize * 9
|
||||||
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.pixelSize: rootFontSize * 2.66
|
font.pointSize: root.font.pointSize * 2
|
||||||
font.bold: true
|
font.bold: true
|
||||||
renderType: Text.QtRendering
|
renderType: Text.QtRendering
|
||||||
|
|
||||||
|
|||||||
+61
-89
@@ -1,48 +1,41 @@
|
|||||||
// 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-2026 Keyitdev
|
// Copyright (C) 2022-2025 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
|
import QtQuick 2.15
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts 1.15
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls 2.15
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
readonly property real passwordFieldTopMargin: (Number(config.PasswordFieldTopMargin) || 0) * rootHeightUnit
|
|
||||||
readonly property real loginButtonTopMargin: (Number(config.LoginButtonTopMargin) || 0) * rootHeightUnit
|
|
||||||
|
|
||||||
function findRegisteredUser(typedUser, matchRealName) {
|
|
||||||
for (var i = 0; i < userRegistry.list.length; i++) {
|
|
||||||
var candidate = userRegistry.list[i]
|
|
||||||
if (typedUser === candidate.name || (matchRealName && typedUser === candidate.realName)) {
|
|
||||||
return candidate
|
|
||||||
}
|
|
||||||
}
|
|
||||||
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() {
|
function triggerLogin() {
|
||||||
var typedUser = username.text
|
var typedUser = username.text
|
||||||
var match = findRegisteredUser(typedUser, config.UseRealName == "true")
|
var targetUser = typedUser
|
||||||
var targetUser = match ? match.name : typedUser
|
|
||||||
|
if (config.UseRealName == "true") {
|
||||||
|
for (var i = 0; i < userRegistry.list.length; i++) {
|
||||||
|
var u = userRegistry.list[i]
|
||||||
|
if (typedUser === u.realName || typedUser === u.name) {
|
||||||
|
targetUser = u.name
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (var j = 0; j < userRegistry.list.length; j++) {
|
||||||
|
var u2 = userRegistry.list[j]
|
||||||
|
if (typedUser === u2.name) {
|
||||||
|
targetUser = u2.name
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
sddm.login(targetUser, password.text, sessionSelect.selectedSession)
|
sddm.login(targetUser, password.text, sessionSelect.selectedSession)
|
||||||
}
|
}
|
||||||
@@ -50,7 +43,8 @@ Column {
|
|||||||
Item {
|
Item {
|
||||||
id: errorMessageField
|
id: errorMessageField
|
||||||
|
|
||||||
height: rootHeightUnit * 1.5
|
// change also in selectSession
|
||||||
|
height: root.font.pointSize * 2
|
||||||
width: parent.width / 2
|
width: parent.width / 2
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
@@ -60,9 +54,8 @@ Column {
|
|||||||
width: parent.width
|
width: parent.width
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
|
||||||
text: failed ? config.TranslateLoginFailedWarning || textConstants.loginFailed + "!" : keyboard.capsLock ? config.TranslateCapslockWarning || textConstants.capslockWarning : ""
|
text: failed ? config.TranslateLoginFailedWarning || textConstants.loginFailed + "!" : keyboard.capsLock ? config.TranslateCapslockWarning || textConstants.capslockWarning : null
|
||||||
|
font.pointSize: root.font.pointSize * 0.8
|
||||||
font.pixelSize: rootFontSize * 1.33
|
|
||||||
font.italic: true
|
font.italic: true
|
||||||
color: config.WarningColor
|
color: config.WarningColor
|
||||||
opacity: 0
|
opacity: 0
|
||||||
@@ -99,7 +92,7 @@ Column {
|
|||||||
Item {
|
Item {
|
||||||
id: usernameField
|
id: usernameField
|
||||||
|
|
||||||
height: username.height
|
height: root.font.pointSize * 4.5
|
||||||
width: parent.width / 2
|
width: parent.width / 2
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
@@ -109,7 +102,6 @@ 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
|
||||||
@@ -135,20 +127,15 @@ Column {
|
|||||||
|
|
||||||
delegate: ItemDelegate {
|
delegate: ItemDelegate {
|
||||||
// minus padding
|
// minus padding
|
||||||
width: popupHandler.width - (rootWidthUnit * 1.5)
|
width: popupHandler.width - 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: config.UseRealName == "true" ? (model.realName || model.name) : model.name
|
text: config.UseRealName == "true" ? (model.realName || model.name) : model.name
|
||||||
font.pixelSize: rootFontSize * 1.06
|
font.pointSize: root.font.pointSize * 0.8
|
||||||
font.capitalization: Font.MixedCase
|
font.capitalization: Font.MixedCase
|
||||||
font.family: root.font.family
|
font.family: root.font.family
|
||||||
color: config.DropdownTextColor
|
color: config.DropdownTextColor
|
||||||
@@ -166,10 +153,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.height: parent.height * 0.4
|
icon.width: parent.height * 0.25
|
||||||
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")
|
||||||
@@ -191,12 +178,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 + selectUser.anchors.leftMargin) : 0 - selectUser.anchors.leftMargin
|
x: config.RightToLeftLayout == "true" ? -loginButton.width + selectUser.width : 0
|
||||||
rightMargin: config.RightToLeftLayout == "true" ? root.padding + usernameField.width / 2 : undefined
|
rightMargin: config.RightToLeftLayout == "true" ? root.padding + usernameField.width / 2 : undefined
|
||||||
padding: rootHeightUnit * 0.75
|
padding: 10
|
||||||
|
|
||||||
contentItem: ListView {
|
contentItem: ListView {
|
||||||
implicitHeight: contentHeight + (rootHeightUnit * 1.5)
|
implicitHeight: contentHeight + 20
|
||||||
|
|
||||||
clip: true
|
clip: true
|
||||||
model: selectUser.popup.visible ? selectUser.delegateModel : null
|
model: selectUser.popup.visible ? selectUser.delegateModel : null
|
||||||
@@ -205,7 +192,7 @@ Column {
|
|||||||
}
|
}
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
radius: (rootScaleUnit * config.RoundCorners) / 2
|
radius: config.RoundCorners / 2
|
||||||
color: config.DropdownBackgroundColor
|
color: config.DropdownBackgroundColor
|
||||||
layer.enabled: true
|
layer.enabled: true
|
||||||
}
|
}
|
||||||
@@ -256,12 +243,9 @@ Column {
|
|||||||
id: username
|
id: username
|
||||||
|
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
height: rootHeightUnit * 3
|
height: root.font.pointSize * 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
|
||||||
@@ -282,8 +266,8 @@ Column {
|
|||||||
color: config.LoginFieldBackgroundColor
|
color: config.LoginFieldBackgroundColor
|
||||||
opacity: 0.2
|
opacity: 0.2
|
||||||
border.color: "transparent"
|
border.color: "transparent"
|
||||||
border.width: parent.activeFocus ? (rootScaleUnit * 2) : (rootScaleUnit * 1)
|
border.width: parent.activeFocus ? 2 : 1
|
||||||
radius: rootScaleUnit * config.RoundCorners || 0
|
radius: config.RoundCorners || 0
|
||||||
}
|
}
|
||||||
|
|
||||||
onAccepted: triggerLogin()
|
onAccepted: triggerLogin()
|
||||||
@@ -306,30 +290,25 @@ Column {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
|
||||||
id: passwordFieldSpacer
|
|
||||||
width: 1
|
|
||||||
height: passwordFieldTopMargin
|
|
||||||
}
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: passwordField
|
id: passwordField
|
||||||
|
|
||||||
height: password.height
|
height: root.font.pointSize * 4.5
|
||||||
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.2
|
anchors.leftMargin: selectUser.height * 0
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
z: 2
|
z: 2
|
||||||
|
|
||||||
icon.height: parent.height * 0.4
|
icon.height: parent.height * 0.25
|
||||||
icon.width: parent.height * 0.4
|
icon.width: parent.height * 0.25
|
||||||
icon.color: config.PasswordIconColor
|
icon.color: config.PasswordIconColor
|
||||||
icon.source: Qt.resolvedUrl("../Assets/Password2.svg")
|
icon.source: Qt.resolvedUrl("../Assets/Password2.svg")
|
||||||
|
|
||||||
@@ -395,22 +374,19 @@ Column {
|
|||||||
TextField {
|
TextField {
|
||||||
id: password
|
id: password
|
||||||
|
|
||||||
height: rootHeightUnit * 3
|
height: root.font.pointSize * 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"
|
focus: config.PasswordFocus == "true" ? true : false
|
||||||
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.ShowLastPasswordCharacter == "true" ? 1000 : undefined
|
passwordMaskDelay: config.HideCompletePassword == "true" ? undefined : 1000
|
||||||
renderType: Text.QtRendering
|
renderType: Text.QtRendering
|
||||||
selectByMouse: true
|
selectByMouse: true
|
||||||
|
|
||||||
@@ -418,8 +394,8 @@ Column {
|
|||||||
color: config.PasswordFieldBackgroundColor
|
color: config.PasswordFieldBackgroundColor
|
||||||
opacity: 0.2
|
opacity: 0.2
|
||||||
border.color: "transparent"
|
border.color: "transparent"
|
||||||
border.width: parent.activeFocus ? (rootScaleUnit * 2) : (rootScaleUnit * 1)
|
border.width: parent.activeFocus ? 2 : 1
|
||||||
radius: rootScaleUnit * config.RoundCorners || 0
|
radius: config.RoundCorners || 0
|
||||||
}
|
}
|
||||||
onAccepted: triggerLogin()
|
onAccepted: triggerLogin()
|
||||||
KeyNavigation.down: loginButton
|
KeyNavigation.down: loginButton
|
||||||
@@ -449,31 +425,27 @@ Column {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
|
||||||
id: loginButtonSpacer
|
|
||||||
width: 1
|
|
||||||
height: loginButtonTopMargin
|
|
||||||
}
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: login
|
id: login
|
||||||
|
|
||||||
height: loginButton.height
|
// important
|
||||||
|
// 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.ShowLoginButton == "true"
|
visible: config.HideLoginButton == "true" ? false : true
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
id: loginButton
|
id: loginButton
|
||||||
|
|
||||||
height: rootHeightUnit * 3
|
height: root.font.pointSize * 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 != "")
|
enabled: config.AllowEmptyPassword == "true" || username.text != "" && password.text != "" ? true : false
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
|
|
||||||
contentItem: Text {
|
contentItem: Text {
|
||||||
@@ -481,7 +453,7 @@ Column {
|
|||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
|
||||||
font.bold: true
|
font.bold: true
|
||||||
font.pixelSize: rootFontSize * 1.33
|
font.pointSize: root.font.pointSize
|
||||||
font.family: root.font.family
|
font.family: root.font.family
|
||||||
color: config.LoginButtonTextColor
|
color: config.LoginButtonTextColor
|
||||||
text: parent.text
|
text: parent.text
|
||||||
@@ -493,7 +465,7 @@ Column {
|
|||||||
|
|
||||||
color: config.LoginButtonBackgroundColor
|
color: config.LoginButtonBackgroundColor
|
||||||
opacity: 0.2
|
opacity: 0.2
|
||||||
radius: rootScaleUnit * config.RoundCorners || 0
|
radius: config.RoundCorners || 0
|
||||||
}
|
}
|
||||||
|
|
||||||
states: [
|
states: [
|
||||||
@@ -562,7 +534,7 @@ Column {
|
|||||||
Keys.onReturnPressed: clicked()
|
Keys.onReturnPressed: clicked()
|
||||||
Keys.onEnterPressed: clicked()
|
Keys.onEnterPressed: clicked()
|
||||||
|
|
||||||
KeyNavigation.down: config.ShowSystemButtons == "true" ? systemButtons.children[0] : virtualKeyboard
|
KeyNavigation.down: config.HideSystemButtons == "true" ? virtualKeyboard : systemButtons.children[0]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -576,7 +548,7 @@ Column {
|
|||||||
Item {
|
Item {
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
var currentList = userRegistry.list
|
var currentList = userRegistry.list
|
||||||
currentList.push({ "name": model.name, "realName": model.realName || "", "icon": model.icon || "" })
|
currentList.push({ "name": model.name, "realName": model.realName || "" })
|
||||||
userRegistry.list = currentList
|
userRegistry.list = currentList
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+36
-95
@@ -1,122 +1,63 @@
|
|||||||
// 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-2026 Keyitdev
|
// Copyright (C) 2022-2025 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
|
import QtQuick 2.15
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts 1.15
|
||||||
import SddmComponents 2.0 as SDDM
|
import SddmComponents 2.0 as SDDM
|
||||||
|
|
||||||
Item {
|
ColumnLayout {
|
||||||
id: formContainer
|
id: formContainer
|
||||||
SDDM.TextConstants { id: textConstants }
|
SDDM.TextConstants { id: textConstants }
|
||||||
|
|
||||||
readonly property real clockTopMargin: (Number(config.ClockTopMargin) || 0) * rootHeightUnit
|
property int p: config.ScreenPadding == "" ? 0 : config.ScreenPadding
|
||||||
readonly property real profilePictureTopMargin: (Number(config.ProfilePictureTopMargin) || 0) * rootHeightUnit
|
property string a: config.FormPosition
|
||||||
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
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
id: topGroup
|
|
||||||
spacing: 0
|
|
||||||
anchors.top: parent.top
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
id: clockBox
|
|
||||||
color: "transparent"
|
|
||||||
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 {
|
Clock {
|
||||||
anchors.fill: parent
|
|
||||||
id: clock
|
id: clock
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
||||||
|
// important
|
||||||
|
Layout.preferredHeight: root.height / 3
|
||||||
|
Layout.leftMargin: p != "0" ? a == "left" ? -p : a == "right" ? p : 0 : 0
|
||||||
}
|
}
|
||||||
}
|
|
||||||
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 {
|
Input {
|
||||||
id: input
|
id: input
|
||||||
anchors.centerIn: parent
|
|
||||||
width: rootWidthUnit * 65
|
Layout.alignment: Qt.AlignVCenter
|
||||||
}
|
Layout.preferredHeight: root.height / 10
|
||||||
}
|
Layout.leftMargin: p != "0" ? a == "left" ? -p : a == "right" ? p : 0 : 0
|
||||||
|
Layout.topMargin: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
id: bottomGroup
|
|
||||||
spacing: 0
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
id: systemButtonsBox
|
|
||||||
color: "transparent"
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
Layout.bottomMargin: systemButtonsBottomMargin
|
|
||||||
Layout.preferredHeight: systemButtons.implicitHeight
|
|
||||||
implicitWidth: systemButtons.implicitWidth
|
|
||||||
Layout.preferredWidth: implicitWidth
|
|
||||||
SystemButtons {
|
SystemButtons {
|
||||||
id: systemButtons
|
id: systemButtons
|
||||||
anchors.centerIn: parent
|
|
||||||
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
||||||
|
Layout.preferredHeight: root.height / 5
|
||||||
|
Layout.maximumHeight: root.height / 5
|
||||||
|
Layout.leftMargin: p != "0" ? a == "left" ? -p : a == "right" ? p : 0 : 0
|
||||||
|
|
||||||
|
exposedSession: input.exposeSession
|
||||||
}
|
}
|
||||||
}
|
|
||||||
Rectangle {
|
|
||||||
id: sessionSelectBox
|
|
||||||
color: "transparent"
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
Layout.bottomMargin: sessionSelectBottomMargin
|
|
||||||
Layout.preferredHeight: sessionSelect.height
|
|
||||||
implicitWidth: sessionSelect.width
|
|
||||||
Layout.preferredWidth: implicitWidth
|
|
||||||
SessionButton {
|
SessionButton {
|
||||||
id: sessionSelect
|
id: sessionSelect
|
||||||
anchors.centerIn: parent
|
|
||||||
width: rootWidthUnit * 32.5
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
|
||||||
|
Layout.preferredHeight: root.height / 54
|
||||||
|
Layout.maximumHeight: root.height / 54
|
||||||
|
Layout.leftMargin: p != "0" ? a == "left" ? -p : a == "right" ? p : 0 : 0
|
||||||
}
|
}
|
||||||
}
|
|
||||||
Rectangle {
|
|
||||||
id: virtualKeyboardButtonBox
|
|
||||||
color: "transparent"
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
Layout.bottomMargin: virtualKeyboardButtonBottomMargin
|
|
||||||
Layout.preferredHeight: virtualKeyboardButton.height
|
|
||||||
implicitWidth: virtualKeyboardButton.width
|
|
||||||
Layout.preferredWidth: implicitWidth
|
|
||||||
VirtualKeyboardButton {
|
VirtualKeyboardButton {
|
||||||
id: virtualKeyboardButton
|
id: virtualKeyboardButton
|
||||||
anchors.centerIn: parent
|
|
||||||
width: rootWidthUnit * 32.5
|
Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
||||||
}
|
Layout.preferredHeight: root.height / 27
|
||||||
}
|
Layout.maximumHeight: root.height / 27
|
||||||
|
Layout.leftMargin: p != "0" ? a == "left" ? -p : a == "right" ? p : 0 : 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,61 +0,0 @@
|
|||||||
// 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,25 +1,28 @@
|
|||||||
// 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-2026 Keyitdev
|
// Copyright (C) 2022-2025 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
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls 2.15
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: sessionButton
|
id: sessionButton
|
||||||
|
|
||||||
height: selectSession.height
|
height: root.font.pointSize
|
||||||
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
|
||||||
|
|
||||||
height: rootHeightUnit
|
// important
|
||||||
width: parent.width
|
// change also in errorMessage
|
||||||
|
height: root.font.pointSize * 2
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
@@ -35,20 +38,15 @@ Item {
|
|||||||
|
|
||||||
delegate: ItemDelegate {
|
delegate: ItemDelegate {
|
||||||
// minus padding
|
// minus padding
|
||||||
width: popupHandler.width - (rootScaleUnit * 20)
|
width: popupHandler.width - 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.pixelSize: rootFontSize * 1.06
|
font.pointSize: root.font.pointSize * 0.8
|
||||||
font.family: root.font.family
|
font.family: root.font.family
|
||||||
color: config.DropdownTextColor
|
color: config.DropdownTextColor
|
||||||
}
|
}
|
||||||
@@ -66,19 +64,18 @@ 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.pixelSize: rootFontSize * 1.06
|
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()
|
||||||
}
|
}
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
height: parent.visualFocus ? (rootScaleUnit * 2) : 0
|
height: parent.visualFocus ? 2 : 0
|
||||||
width: parent.width
|
width: displayedItem.implicitWidth
|
||||||
|
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
}
|
}
|
||||||
@@ -88,12 +85,12 @@ Item {
|
|||||||
|
|
||||||
implicitHeight: contentItem.implicitHeight
|
implicitHeight: contentItem.implicitHeight
|
||||||
width: sessionButton.width
|
width: sessionButton.width
|
||||||
y: parent.height + rootHeightUnit
|
y: parent.height - 1
|
||||||
x: 0
|
x: -popupHandler.width/2 + displayedItem.width/2
|
||||||
padding: rootScaleUnit * 10
|
padding: 10
|
||||||
|
|
||||||
contentItem: ListView {
|
contentItem: ListView {
|
||||||
implicitHeight: contentHeight + (rootScaleUnit * 20)
|
implicitHeight: contentHeight + 20
|
||||||
|
|
||||||
clip: true
|
clip: true
|
||||||
model: selectSession.popup.visible ? selectSession.delegateModel : null
|
model: selectSession.popup.visible ? selectSession.delegateModel : null
|
||||||
@@ -102,7 +99,7 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
radius: (rootScaleUnit * config.RoundCorners) / 2
|
radius: config.RoundCorners / 2
|
||||||
color: config.DropdownBackgroundColor
|
color: config.DropdownBackgroundColor
|
||||||
layer.enabled: true
|
layer.enabled: true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,77 +1,81 @@
|
|||||||
// 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-2026 Keyitdev
|
// Copyright (C) 2022-2025 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
|
import QtQuick 2.15
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts 1.15
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls 2.15
|
||||||
|
|
||||||
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.pixelSize: rootFontSize * 1.06
|
font.pointSize: root.font.pointSize * 0.8
|
||||||
icon.source: Qt.resolvedUrl("../Assets/" + modelData[0] + ".svg")
|
icon.source: modelData ? Qt.resolvedUrl("../Assets/" + modelData[0] + ".svg") : ""
|
||||||
icon.height: 2 * Math.round((rootFontSize * 3) / 2)
|
icon.height: 2 * Math.round((root.font.pointSize * 3) / 2)
|
||||||
icon.width: 2 * Math.round((rootFontSize * 3) / 2)
|
icon.width: 2 * Math.round((root.font.pointSize * 3) / 2)
|
||||||
icon.color: config.SystemButtonsIconsColor
|
icon.color: config.SystemButtonsIconsColor
|
||||||
palette.buttonText: config.SystemButtonsIconsColor
|
palette.buttonText: config.SystemButtonsIconsColor
|
||||||
display: AbstractButton.TextUnderIcon
|
display: AbstractButton.TextUnderIcon
|
||||||
spacing: rootScaleUnit * 6
|
visible: config.HideSystemButtons != "true" && (config.BypassSystemButtonsChecks == "true" ? 1 : modelData[2])
|
||||||
padding: rootScaleUnit * 8
|
|
||||||
visible: config.ShowSystemButtons == "true" && (config.BypassSystemButtonsChecks == "true" || modelData[2])
|
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
height: rootScaleUnit * 2
|
height: 2
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
}
|
}
|
||||||
|
|
||||||
Keys.onReturnPressed: clicked()
|
Keys.onReturnPressed: clicked()
|
||||||
onClicked: {
|
onClicked: {
|
||||||
parent.forceActiveFocus()
|
parent.forceActiveFocus()
|
||||||
switch (index) {
|
index == 0 ? sddm.powerOff() : index == 1 ? sddm.reboot() : index == 2 ? sddm.suspend() : sddm.hibernate()
|
||||||
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: sysButton.down
|
when: parent.children[index].down
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: sysButton
|
target: parent.children[index]
|
||||||
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: sysButton.hovered
|
when: parent.children[index].hovered
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: sysButton
|
target: parent.children[index]
|
||||||
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: sysButton.activeFocus
|
when: parent.children[index].activeFocus
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: sysButton
|
target: parent.children[index]
|
||||||
icon.color: root.palette.buttonText
|
icon.color: root.palette.buttonText
|
||||||
palette.buttonText: root.palette.buttonText
|
palette.buttonText: root.palette.buttonText
|
||||||
}
|
}
|
||||||
@@ -85,6 +89,9 @@ 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-2026 Keyitdev
|
// Copyright (C) 2022-2025 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
|
import QtQuick 2.15
|
||||||
import QtQuick.VirtualKeyboard
|
import QtQuick.VirtualKeyboard 2.3
|
||||||
|
|
||||||
InputPanel {
|
InputPanel {
|
||||||
id: virtualKeyboard
|
id: virtualKeyboard
|
||||||
|
|||||||
@@ -1,24 +1,18 @@
|
|||||||
// 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-2026 Keyitdev
|
// Copyright (C) 2022-2025 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
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls 2.15
|
||||||
|
|
||||||
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.ShowVirtualKeyboard == "true"
|
visible: virtualKeyboard.status == Loader.Ready && config.HideVirtualKeyboard == "false"
|
||||||
checkable: true
|
checkable: true
|
||||||
onClicked: virtualKeyboard.switchState()
|
onClicked: virtualKeyboard.switchState()
|
||||||
|
|
||||||
@@ -34,11 +28,8 @@ 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.pixelSize: rootFontSize * 1.06
|
font.pointSize: root.font.pointSize * 0.8
|
||||||
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,10 +1,11 @@
|
|||||||
// 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-2026 Keyitdev
|
// Copyright (C) 2022-2025 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
|
import QtQuick 2.15
|
||||||
import QtQuick.Controls
|
import QtQuick.Layouts 1.15
|
||||||
|
import QtQuick.Controls 2.15
|
||||||
import QtQuick.Effects
|
import QtQuick.Effects
|
||||||
import QtMultimedia
|
import QtMultimedia
|
||||||
|
|
||||||
@@ -13,8 +14,8 @@ import "Components"
|
|||||||
Pane {
|
Pane {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
height: Screen.height
|
height: config.ScreenHeight || Screen.height
|
||||||
width: Screen.width
|
width: config.ScreenWidth || Screen.ScreenWidth
|
||||||
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
|
||||||
@@ -26,36 +27,27 @@ 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 != "true" &&
|
config.PartialBlur == "false" &&
|
||||||
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 != "true" &&
|
config.PartialBlur == "false" &&
|
||||||
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 != "true" &&
|
config.PartialBlur == "false" &&
|
||||||
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 != "true" &&
|
config.PartialBlur == "false" &&
|
||||||
config.FormPosition == "right" &&
|
config.FormPosition == "right" &&
|
||||||
config.BackgroundHorizontalAlignment == "center"
|
config.BackgroundHorizontalAlignment == "center"
|
||||||
|
|
||||||
@@ -85,7 +77,7 @@ Pane {
|
|||||||
z: 1
|
z: 1
|
||||||
|
|
||||||
color: config.FormBackgroundColor
|
color: config.FormBackgroundColor
|
||||||
visible: config.HaveFormBackground == "true"
|
visible: config.HaveFormBackground == "true" ? true : false
|
||||||
opacity: config.PartialBlur == "true" ? 0.3 : 1
|
opacity: config.PartialBlur == "true" ? 0.3 : 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -235,7 +227,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"
|
paused: config.PauseBackground == "true" ? 1 : 0
|
||||||
fillMode: config.CropBackground == "true" ? Image.PreserveAspectCrop : Image.PreserveAspectFit
|
fillMode: config.CropBackground == "true" ? Image.PreserveAspectCrop : Image.PreserveAspectFit
|
||||||
asynchronous: true
|
asynchronous: true
|
||||||
cache: true
|
cache: true
|
||||||
@@ -251,7 +243,7 @@ Pane {
|
|||||||
player.play();
|
player.play();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
backgroundImage.source = config.Background
|
backgroundImage.source = config.background || config.Background
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -270,7 +262,7 @@ 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"
|
visible: config.FullBlur == "true" || config.PartialBlur == "true" ? true : false
|
||||||
}
|
}
|
||||||
|
|
||||||
MultiEffect {
|
MultiEffect {
|
||||||
@@ -282,21 +274,15 @@ Pane {
|
|||||||
// 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.HaveFormBackground == "true" && config.PartialBlur != "true" && config.FormPosition != "center" ? parent.width - formBackground.width : parent.width) : form.width
|
width: (config.FullBlur == "true" && config.PartialBlur == "false" && config.FormPosition != "center" ) ? parent.width - formBackground.width : config.FullBlur == "true" ? 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
|
||||||
property real parsedBlur: config.Blur === "" ? 2.0 : parseFloat(config.Blur)
|
blurMax: config.BlurMax == "" ? 48 : config.BlurMax
|
||||||
property real scaledBlur: parsedBlur * root.rootScaleUnit
|
visible: config.FullBlur == "true" || config.PartialBlur == "true" ? true : false
|
||||||
|
|
||||||
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.5
|
Version=1.4
|
||||||
ConfigFile=Themes/astronaut.conf
|
ConfigFile=Themes/astronaut.conf
|
||||||
Screenshot=Previews/astronaut.png
|
Screenshot=Previews/astronaut.png
|
||||||
MainScript=Main.qml
|
MainScript=Main.qml
|
||||||
|
|||||||
@@ -181,8 +181,19 @@ _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 /run/runit/service ]; then echo "/run/runit/service"
|
if [ -d /service ]; then echo "/service" # legacy/upstream symlink
|
||||||
|
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"
|
||||||
@@ -230,16 +241,23 @@ enable_sddm() {
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
runit)
|
runit)
|
||||||
|
local sv
|
||||||
local runsvdir
|
local runsvdir
|
||||||
|
sv=$(_runit_sv)
|
||||||
runsvdir=$(_runit_runsvdir)
|
runsvdir=$(_runit_runsvdir)
|
||||||
|
|
||||||
if [ ! -d /etc/sv/sddm ]; then
|
if [ -f /etc/os-release ] && grep -q 'ID=artix' /etc/os-release; then
|
||||||
error "/etc/sv/sddm not found - is sddm-runit (or equivalent) installed?"
|
sudo pacman --needed -S sddm-runit
|
||||||
|
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 /etc/sv/sddm "$runsvdir/sddm"
|
sudo ln -sf "$sv/sddm" "$runsvdir/"
|
||||||
info "sddm symlinked into $runsvdir"
|
info "sddm symlinked into $runsvdir"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
@@ -268,7 +286,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 /run/runit/service/"
|
echo " runit - sudo ln -s /etc/sv/sddm /var/service/ || sudo ln -s /etc/runit/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