keyitdev / sddm-astronaut-theme Goto Github PK
View Code? Open in Web Editor NEWModern looking sddm qt6 theme.
License: GNU General Public License v3.0
Modern looking sddm qt6 theme.
License: GNU General Public License v3.0
Would you have any idea why the text is stuck as black? I've tried setting it to white in theme.conf. I've also tried messing with the Main.qml, but nothing seems to work.
I'm on Endeavour OS with Gnome. (DE shouldn't matter, right?)
I'm attaching my theme.conf and Main.qml. Thank you for looking!
[General]
Background="background.png"
DimBackgroundImage="0.4"
ScaleImageCropped="true"
ScreenWidth="1920"
ScreenHeight="1080"
[Blur Settings]
FullBlur="false"
PartialBlur="true"
BlurRadius="80"
[Design Customizations]
HaveFormBackground="true"
FormPosition="center"
BackgroundImageHAlignment="center"
BackgroundImageVAlignment="center"
#########
## Colors
#########
MainColor="#ffffff"
AccentColor="#ffffff"
OverrideTextFieldColor="#ffffff"
BackgroundColor="#21222C"
placeholderColor="#ffffff"
IconColor="#ffffff"
OverrideLoginButtonTextColor="#ffffff"
InterfaceShadowSize="3"
InterfaceShadowOpacity="0.6"
RoundCorners="12"
ScreenPadding="0"
Font="Open Sans"
FontSize=""
HideLoginButton="true"
[Interface Behavior]
ForceRightToLeft="false"
ForceLastUser="true"
ForcePasswordFocus="true"
ForceHideCompletePassword="false"
ForceHideVirtualKeyboardButton="true"
ForceHideSystemButtons="false"
AllowEmptyPassword="false"
AllowBadUsernames="false"
[Locale Settings]
Locale=""
HourFormat="HH:mm"
DateFormat="dddd d MMMM"
import QtQuick 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15
import Qt5Compat.GraphicalEffects
import "Components"
Pane {
id: root
height: config.ScreenHeight || Screen.height
width: config.ScreenWidth || Screen.width
LayoutMirroring.enabled: config.ForceRightToLeft == "true" ? true : Qt.application.layoutDirection === Qt.RightToLeft
LayoutMirroring.childrenInherit: true
padding: config.ScreenPadding
palette.button: "transparent"
palette.highlight: config.AccentColor
palette.highlightedText: config.OverrideTextFieldColor !== "" ? config.OverrideTextFieldColor : root.palette.highlight
palette.text: config.MainColor
palette.buttonText: config.MainColor
palette.window: config.BackgroundColor
font.family: config.Font
font.pointSize: config.FontSize !== "" ? config.FontSize : parseInt(height / 80)
focus: true
property bool leftleft: config.HaveFormBackground == "true" &&
config.PartialBlur == "false" &&
config.FormPosition == "left" &&
config.BackgroundImageHAlignment == "left"
property bool leftcenter: config.HaveFormBackground == "true" &&
config.PartialBlur == "false" &&
config.FormPosition == "left" &&
config.BackgroundImageHAlignment == "center"
property bool rightright: config.HaveFormBackground == "true" &&
config.PartialBlur == "false" &&
config.FormPosition == "right" &&
config.BackgroundImageHAlignment == "right"
property bool rightcenter: config.HaveFormBackground == "true" &&
config.PartialBlur == "false" &&
config.FormPosition == "right" &&
config.BackgroundImageHAlignment == "center"
Item {
id: sizeHelper
anchors.fill: parent
height: parent.height
width: parent.width
Rectangle {
id: tintLayer
anchors.fill: parent
width: parent.width
height: parent.height
color: "black"
opacity: config.DimBackgroundImage
z: 1
}
Image {
id: backgroundImage
anchors.fill: parent
source: "file:///usr/share/sddm/themes/sebastian-theme/background.png"
fillMode: config.ScaleImageCropped == "true" ? Image.PreserveAspectCrop : Image.PreserveAspectFit
asynchronous: true
cache: true
clip: true
mipmap: true
}
ShaderEffectSource {
id: blurMask
sourceItem: backgroundImage
width: parent.width
height: parent.height
anchors.centerIn: parent
visible: config.FullBlur == "true" || config.PartialBlur == "true"
}
GaussianBlur {
id: blur
anchors.fill: parent
source: blurMask
radius: config.BlurRadius
samples: config.BlurRadius * 2 + 1
cached: true
visible: config.FullBlur == "true" || config.PartialBlur == "true"
}
Rectangle {
id: formBackground
anchors.fill: form
anchors.centerIn: form
color: root.palette.window
visible: config.HaveFormBackground == "true"
opacity: config.PartialBlur == "true" ? 0.3 : 1
z: 2
}
LoginForm {
id: form
height: virtualKeyboard.state == "visible" ? parent.height - virtualKeyboard.implicitHeight : parent.height
width: parent.width / 2.5
anchors.centerIn: parent
virtualKeyboardActive: virtualKeyboard.state == "visible"
z: 3
}
Button {
id: vkb
onClicked: virtualKeyboard.switchState()
visible: virtualKeyboard.status == Loader.Ready && config.ForceHideVirtualKeyboardButton == "false"
anchors.bottom: parent.bottom
anchors.bottomMargin: implicitHeight
anchors.horizontalCenter: form.horizontalCenter
z: 4
contentItem: Text {
text: config.TranslateVirtualKeyboardButton || "Virtual Keyboard"
color: parent.visualFocus ? palette.highlight : palette.text
font.pointSize: root.font.pointSize * 0.8
}
background: Rectangle {
id: vkbbg
color: "transparent"
}
}
Loader {
id: virtualKeyboard
source: "Components/VirtualKeyboard.qml"
state: "hidden"
property bool keyboardActive: item ? item.active : false
onKeyboardActiveChanged: keyboardActive ? state = "visible" : state = "hidden"
width: parent.width
z: 1
function switchState() { state = state == "hidden" ? "visible" : "hidden" }
states: [
State {
name: "visible"
PropertyChanges {
target: form
systemButtonVisibility: false
clockVisibility: false
}
PropertyChanges {
target: virtualKeyboard
y: root.height - virtualKeyboard.height
opacity: 1
}
},
State {
name: "hidden"
PropertyChanges {
target: virtualKeyboard
y: root.height - root.height/4
opacity: 0
}
}
]
transitions: [
Transition {
from: "hidden"
to: "visible"
SequentialAnimation {
ScriptAction {
script: {
virtualKeyboard.item.activated = true;
Qt.inputMethod.show();
}
}
ParallelAnimation {
NumberAnimation {
target: virtualKeyboard
property: "y"
duration: 100
easing.type: Easing.OutQuad
}
OpacityAnimator {
target: virtualKeyboard
duration: 100
easing.type: Easing.OutQuad
}
}
}
},
Transition {
from: "visible"
to: "hidden"
SequentialAnimation {
ParallelAnimation {
NumberAnimation {
target: virtualKeyboard
property: "y"
duration: 100
easing.type: Easing.InQuad
}
OpacityAnimator {
target: virtualKeyboard
duration: 100
easing.type: Easing.InQuad
}
}
ScriptAction {
script: {
Qt.inputMethod.hide();
}
}
}
}
]
}
MouseArea {
anchors.fill: backgroundImage
onClicked: parent.forceActiveFocus()
}
// Ensure other text elements use MainColor
Component.onCompleted: {
form.color = config.MainColor;
vkb.color = config.MainColor;
}
}
}
If you set
OverrideTextFieldColor=""
then selected text always has the same color as AccentColor
and is impossible to read.
If you set OverrideTextFieldColor
to anything, e.g.
OverrideTextFieldColor="#123456"
then selected text is always black.
I am aware this can be configured but I find the default AccentColor very hard to read. Especially if you move the form to the left
#8a73a1 works quite well and also looks a bit nicer. I was wondering whether we could make that a default?
Old default with the form in the center:
The one with the form in the center doesn't contrast the image as much, but that doesn't really matter because it's different from the dark input form field
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.