veilor-os/assets/sddm/veilor-black/Main.qml
veilor-org d2649fb335 v0.3 theme: match onyx exactly — solid black wallpaper, Linux Konsole scheme, Breeze_Light cursor
Onyx uses Plasma's org.kde.color plugin for solid #000000 (no SVG/image),
default Konsole 'Linux' palette, Breeze_Light cursor, IAX kwin buttons.
Removed wallpaper SVG (not used). Added plasma-desktop.conf snippet +
kdedefaults override for new users.
2026-04-30 17:18:14 +01:00

155 lines
5.1 KiB
QML

// veilor-os SDDM login theme — "veilor-black"
// Minimal black-on-black login screen. Single password field, admin
// pre-filled. Fira Code throughout. Grey accent (#686B6F) on focus.
//
// SDDM QML reference: https://github.com/sddm/sddm/wiki/Themes
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import SddmComponents 2.0
Rectangle {
id: root
width: 1920
height: 1080
color: "#000000"
// Fixed user — admin only (matches kickstart user creation)
property string fixedUser: "admin"
// Palette (mirrors veilor-black.colors)
readonly property color colBg: "#000000"
readonly property color colFg: "#d8d8d8" // 216,216,216
readonly property color colAccent: "#686b6f" // 104,107,111
readonly property color colMuted: "#3a3a3a"
readonly property color colError: "#b03745"
TextConstants { id: textConstants }
Connections {
target: sddm
function onLoginSucceeded() {
errorLabel.text = ""
}
function onLoginFailed() {
errorLabel.text = textConstants.loginFailed
passwordField.text = ""
passwordField.focus = true
}
}
// ── Wordmark ─────────────────────────────────────────────────────────
Text {
id: wordmark
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenterOffset: -120
text: "veilor"
color: colFg
opacity: 0.85
font.family: "Fira Code"
font.pixelSize: 32
font.weight: Font.Light
}
// ── Login form ───────────────────────────────────────────────────────
Column {
id: form
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
anchors.verticalCenterOffset: -10
spacing: 12
width: 320
Text {
anchors.horizontalCenter: parent.horizontalCenter
text: root.fixedUser
color: colAccent
font.family: "Fira Code"
font.pixelSize: 13
font.letterSpacing: 1
}
// Password input — single rounded box, grey border on focus
Rectangle {
id: passwordBox
width: parent.width
height: 44
radius: 4
color: colBg
border.width: 1
border.color: passwordField.focus ? colAccent : colMuted
TextInput {
id: passwordField
anchors.fill: parent
anchors.leftMargin: 12
anchors.rightMargin: 12
verticalAlignment: TextInput.AlignVCenter
color: colFg
selectionColor: colAccent
selectedTextColor: colFg
echoMode: TextInput.Password
passwordCharacter: "•"
font.family: "Fira Code"
font.pixelSize: 14
clip: true
focus: true
activeFocusOnTab: true
Keys.onPressed: function(event) {
if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter) {
sddm.login(root.fixedUser, passwordField.text, sessionCombo.currentIndex)
event.accepted = true
}
}
Text {
anchors.fill: parent
verticalAlignment: Text.AlignVCenter
text: "passphrase"
color: colMuted
font.family: "Fira Code"
font.pixelSize: 14
visible: passwordField.text.length === 0 && !passwordField.focus
}
}
}
Text {
id: errorLabel
anchors.horizontalCenter: parent.horizontalCenter
text: ""
color: colError
font.family: "Fira Code"
font.pixelSize: 11
visible: text.length > 0
}
// Hidden session selector — defaults to first (Plasma)
ComboBox {
id: sessionCombo
visible: false
model: sessionModel
textRole: "name"
currentIndex: sessionModel.lastIndex
}
}
// ── Footer ───────────────────────────────────────────────────────────
Text {
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
anchors.bottomMargin: 24
text: "veilor-os"
color: colMuted
font.family: "Fira Code"
font.pixelSize: 10
font.letterSpacing: 2
}
Component.onCompleted: {
passwordField.forceActiveFocus()
}
}