mirror of
https://github.com/Keyitdev/sddm-astronaut-theme.git
synced 2026-09-24 02:22:09 +00:00
Major update: Improved scaling, added new scaling units, refactored font scaling, and changed how blur is calculated.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
// 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
|
||||||
|
|
||||||
@@ -17,7 +17,7 @@ Column {
|
|||||||
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
font.pointSize: rootFontSize * 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: rootFontSize * 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: rootFontSize * 2
|
font.pixelSize: rootFontSize * 2.66
|
||||||
font.bold: true
|
font.bold: true
|
||||||
renderType: Text.QtRendering
|
renderType: Text.QtRendering
|
||||||
|
|
||||||
|
|||||||
+19
-15
@@ -1,5 +1,5 @@
|
|||||||
// 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
|
||||||
|
|
||||||
@@ -72,7 +72,7 @@ Column {
|
|||||||
|
|
||||||
text: failed ? config.TranslateLoginFailedWarning || textConstants.loginFailed + "!" : keyboard.capsLock ? config.TranslateCapslockWarning || textConstants.capslockWarning : ""
|
text: failed ? config.TranslateLoginFailedWarning || textConstants.loginFailed + "!" : keyboard.capsLock ? config.TranslateCapslockWarning || textConstants.capslockWarning : ""
|
||||||
|
|
||||||
font.pointSize: rootFontSize
|
font.pixelSize: rootFontSize * 1.33
|
||||||
font.italic: true
|
font.italic: true
|
||||||
color: config.WarningColor
|
color: config.WarningColor
|
||||||
opacity: 0
|
opacity: 0
|
||||||
@@ -148,12 +148,17 @@ Column {
|
|||||||
width: popupHandler.width - (rootWidthUnit * 1.5)
|
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: rootFontSize
|
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
|
||||||
@@ -196,7 +201,7 @@ 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: rootHeightUnit * 0.75
|
padding: rootHeightUnit * 0.75
|
||||||
|
|
||||||
@@ -210,7 +215,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
|
||||||
}
|
}
|
||||||
@@ -263,7 +268,7 @@ Column {
|
|||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
height: rootHeightUnit * 3
|
height: rootHeightUnit * 3
|
||||||
width: parent.width
|
width: parent.width
|
||||||
font.pointSize: rootFontSize
|
font.pixelSize: rootFontSize * 1.33
|
||||||
horizontalAlignment: TextInput.AlignHCenter
|
horizontalAlignment: TextInput.AlignHCenter
|
||||||
leftPadding: selectUser.width
|
leftPadding: selectUser.width
|
||||||
rightPadding: selectUser.width
|
rightPadding: selectUser.width
|
||||||
@@ -287,8 +292,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()
|
||||||
@@ -327,11 +332,10 @@ Column {
|
|||||||
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.2
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
z: 2
|
z: 2
|
||||||
|
|
||||||
icon.height: parent.height * 0.4
|
icon.height: parent.height * 0.4
|
||||||
@@ -403,7 +407,7 @@ Column {
|
|||||||
|
|
||||||
height: rootHeightUnit * 3
|
height: rootHeightUnit * 3
|
||||||
width: parent.width
|
width: parent.width
|
||||||
font.pointSize: rootFontSize
|
font.pixelSize: rootFontSize * 1.33
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
horizontalAlignment: TextInput.AlignHCenter
|
horizontalAlignment: TextInput.AlignHCenter
|
||||||
leftPadding: passwordIcon.width
|
leftPadding: passwordIcon.width
|
||||||
@@ -424,8 +428,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
|
||||||
@@ -487,7 +491,7 @@ Column {
|
|||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
|
|
||||||
font.bold: true
|
font.bold: true
|
||||||
font.pointSize: rootFontSize
|
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
|
||||||
@@ -499,7 +503,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: [
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
// 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 2.15
|
||||||
import QtQuick.Layouts 1.15
|
import QtQuick.Layouts 1.15
|
||||||
import SddmComponents 2.0 as SDDM
|
import SddmComponents 2.0 as SDDM
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: formContainer
|
id: formContainer
|
||||||
SDDM.TextConstants { id: textConstants }
|
SDDM.TextConstants { id: textConstants }
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
// 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
|
||||||
import QtQuick.Effects
|
import QtQuick.Effects
|
||||||
|
|
||||||
@@ -33,7 +37,7 @@ Item {
|
|||||||
id: circleMask
|
id: circleMask
|
||||||
|
|
||||||
anchors.fill: avatarImage
|
anchors.fill: avatarImage
|
||||||
radius: config.ProfilePictureRoundedCorners || 0
|
radius: rootScaleUnit * config.ProfilePictureRoundedCorners || 0
|
||||||
visible: false
|
visible: false
|
||||||
layer.enabled: true
|
layer.enabled: true
|
||||||
}
|
}
|
||||||
@@ -49,9 +53,9 @@ Item {
|
|||||||
id: ringBorder
|
id: ringBorder
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
radius: config.ProfilePictureRoundedCorners || 0
|
radius: rootScaleUnit * config.ProfilePictureRoundedCorners || 0
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
border.width: config.ProfilePictureBorderWidth || 2
|
border.width: rootScaleUnit * config.ProfilePictureBorderWidth || 2
|
||||||
border.color: config.ProfilePictureBorderColor
|
border.color: config.ProfilePictureBorderColor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// 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
|
||||||
|
|
||||||
@@ -21,6 +21,7 @@ Item {
|
|||||||
id: selectSession
|
id: selectSession
|
||||||
|
|
||||||
height: rootHeightUnit
|
height: rootHeightUnit
|
||||||
|
width: parent.width
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
@@ -36,15 +37,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: rootFontSize
|
font.pixelSize: rootFontSize * 1.06
|
||||||
font.family: root.font.family
|
font.family: root.font.family
|
||||||
color: config.DropdownTextColor
|
color: config.DropdownTextColor
|
||||||
}
|
}
|
||||||
@@ -62,18 +68,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: rootFontSize * 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"
|
||||||
}
|
}
|
||||||
@@ -84,11 +91,11 @@ Item {
|
|||||||
implicitHeight: contentItem.implicitHeight
|
implicitHeight: contentItem.implicitHeight
|
||||||
width: sessionButton.width
|
width: sessionButton.width
|
||||||
y: parent.height + rootHeightUnit
|
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
|
||||||
@@ -97,7 +104,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,5 +1,5 @@
|
|||||||
// 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
|
||||||
|
|
||||||
@@ -8,73 +8,66 @@ import QtQuick.Layouts 1.15
|
|||||||
import QtQuick.Controls 2.15
|
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
|
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
|
||||||
|
|
||||||
text: modelData[1]
|
text: modelData[1]
|
||||||
font.pointSize: rootFontSize * 0.8
|
font.pixelSize: rootFontSize * 1.06
|
||||||
icon.source: modelData ? 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((rootFontSize * 3) / 2)
|
||||||
icon.width: 2 * Math.round((rootFontSize * 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
|
||||||
|
spacing: rootScaleUnit * 6
|
||||||
|
padding: rootScaleUnit * 8
|
||||||
visible: config.HideSystemButtons != "true" && (config.BypassSystemButtonsChecks == "true" ? 1 : modelData[2])
|
visible: config.HideSystemButtons != "true" && (config.BypassSystemButtonsChecks == "true" ? 1 : 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()
|
index == 0 ? sddm.powerOff() : index == 1 ? sddm.reboot() : index == 2 ? sddm.suspend() : 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
|
||||||
}
|
}
|
||||||
@@ -88,9 +81,6 @@ RowLayout {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// 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
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// 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 2.15
|
||||||
@@ -14,6 +14,7 @@ Item {
|
|||||||
Button {
|
Button {
|
||||||
id: virtualKeyboardButton
|
id: virtualKeyboardButton
|
||||||
height: rootHeightUnit
|
height: rootHeightUnit
|
||||||
|
width: parent.width
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
z: 1
|
z: 1
|
||||||
|
|
||||||
@@ -37,7 +38,7 @@ Item {
|
|||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
|
||||||
text: config.TranslateVirtualKeyboardButtonOff || "Virtual Keyboard (off)"
|
text: config.TranslateVirtualKeyboardButtonOff || "Virtual Keyboard (off)"
|
||||||
font.pointSize: rootFontSize * 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,10 +1,9 @@
|
|||||||
// 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 2.15
|
||||||
import QtQuick.Layouts 1.15
|
|
||||||
import QtQuick.Controls 2.15
|
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.width
|
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,11 +26,16 @@ 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) {
|
||||||
property real rootFontSize: config.FontSize !== "" ? config.FontSize : (height / 90) || 12
|
var n = Number(val)
|
||||||
property real rootHeightUnit: config.HeightUnit !== "" ? config.HeightUnit : (height / 90) || 12
|
return (val === "" || val === undefined || val === null || isNaN(n)) ? 0 : n
|
||||||
property real rootWidthUnit: config.WidthUnit !== "" ? config.WidthUnit : (width / 160) || 12
|
}
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
@@ -284,8 +288,14 @@ Pane {
|
|||||||
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)
|
||||||
|
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" ? true : false
|
visible: config.FullBlur == "true" || config.PartialBlur == "true" ? true : false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+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
|
||||||
|
|||||||
Reference in New Issue
Block a user