feat: wip sddm theme

This commit is contained in:
johannes committed 2026-09-21 16:16:35 +02:00
1 parent 0d00efc465
commit c238eb1929
7 files changed
+360

No files matched your search

@@ -0,0 +1,35 @@
import QtQuick
// Row of "key label" keyboard hints shown under launcher-style overlays,
// e.g. [ [↑↓, "Navigate"], ["↵", "Launch"], ["Esc", "Close"] ].
Row {
id: hintBar
property var hints: []
spacing: Theme.geometry.spacing * 2
Repeater {
model: hintBar.hints
delegate: Row {
spacing: Theme.geometry.spacing / 2
Text {
text: modelData.key
color: Theme.colors.textMuted
font.family: Theme.font.family
font.bold: true
font.pixelSize: Theme.type.caption
}
Text {
text: modelData.label
color: Theme.colors.textMuted
font.family: Theme.font.family
font.pixelSize: Theme.type.caption
}
}
}
}
@@ -0,0 +1,72 @@
import QtQuick
import QtQuick.Effects
// Search/filter input with an animated focus border + glow, shared by
// CommandPalette and ClipboardManager. Navigation is exposed as signals
// (rather than exposing the inner TextInput's Keys handlers directly) so
// each caller can wire up its own list navigation.
Rectangle {
id: field
property alias text: input.text
property alias echoMode: input.echoMode
property string placeholder: ""
signal escapePressed()
signal upPressed()
signal downPressed()
signal returnPressed()
signal deleteRequested()
function focusInput() { input.forceActiveFocus(); }
height: 50
color: Theme.colors.surface
radius: Theme.geometry.radiusSmall
border.width: 1
border.color: input.activeFocus ? Theme.colors.primary : Theme.colors.border
Behavior on border.color { ColorAnimation { duration: Theme.animation.durationFast } }
layer.enabled: input.activeFocus
layer.effect: MultiEffect {
shadowEnabled: true
shadowColor: Theme.colors.primary
shadowOpacity: Theme.elevation.low.opacity
shadowBlur: Theme.elevation.low.blur
shadowHorizontalOffset: 0
shadowVerticalOffset: 0
}
TextInput {
id: input
anchors.fill: parent
anchors.margins: Theme.geometry.padding
verticalAlignment: TextInput.AlignVCenter
font.family: Theme.font.family
font.pixelSize: 18
color: Theme.colors.text
clip: true
Text {
text: field.placeholder
color: Theme.colors.textMuted
font.family: Theme.font.family
font.pixelSize: 18
anchors.verticalCenter: parent.verticalCenter
visible: input.text.length === 0
}
Keys.onEscapePressed: (event) => { field.escapePressed(); event.accepted = true; }
Keys.onUpPressed: (event) => { field.upPressed(); event.accepted = true; }
Keys.onDownPressed: (event) => { field.downPressed(); event.accepted = true; }
Keys.onReturnPressed: (event) => { field.returnPressed(); event.accepted = true; }
Keys.onPressed: (event) => {
if (event.key === Qt.Key_Delete || (event.key === Qt.Key_Backspace && input.text.length === 0)) {
field.deleteRequested();
event.accepted = true;
}
}
}
}
@@ -0,0 +1,91 @@
pragma Singleton
import QtQuick
QtObject {
id: theme
// Regenerated by wallpaper-theme.nu on every wallpaper change - don't
// hand-edit between these markers, it gets overwritten.
// GENERATED:COLORS:BEGIN
property QtObject colors: QtObject {
property color background: "#e611111b"
property color surface: "#cc181825"
property color surfaceHover: "#f2313244"
property color overlay: "#6011111b"
property color primary: "#74c7ec"
property color secondary: "#cba6f7"
property color tertiary: "#a6e3a1"
property color accent: "#74c7ec"
property color primaryContainer: "#2474c7ec"
property color secondaryContainer: "#24cba6f7"
property color tertiaryContainer: "#24a6e3a1"
property color alert: "#f38ba8"
property color alertContainer: "#24f38ba8"
property color success: "#a6e3a1"
property color successContainer: "#24a6e3a1"
property color warning: "#f9e2af"
property color warningContainer: "#24f9e2af"
property color info: "#74c7ec"
property color infoContainer: "#2474c7ec"
property color text: "#cdd6f4"
property color textMuted: "#a6adc8"
property color textOnAccent: "#e611111b"
property color border: "#1a74c7ec"
}
// GENERATED:COLORS:END
property QtObject geometry: QtObject {
property int radiusTiny: 6
property int radiusSmall: 8
property int radiusMedium: 10
property int pillRadius: 100
property int padding: 12
property int spacing: 8
}
property QtObject animation: QtObject {
property int durationFast: 150
property int durationNormal: 250
property int durationSlow: 400
}
// Named spring presets, so call sites stop hand-rolling
// `SpringAnimation { spring: 4; damping: 0.3 }` with slightly different
// numbers each time.
property QtObject motion: QtObject {
property QtObject springSnappy: QtObject { property real spring: 4; property real damping: 0.3 }
property QtObject springSoft: QtObject { property real spring: 3; property real damping: 0.2 }
}
// Type scale. Family stays fixed - this is only about size/weight steps.
property QtObject type: QtObject {
property int caption: 11
property int body: 13
property int label: 14
property int title: 18
property int display: 24
}
property QtObject iconSize: QtObject {
property int small: 14
property int medium: 18
property int large: 24
}
// Named shadow presets for MultiEffect glows, keyed by how prominent the
// glow should read (e.g. hover vs. focus vs. an always-on active state).
property QtObject elevation: QtObject {
property QtObject low: QtObject { property real blur: 0.4; property real opacity: 0.35 }
property QtObject medium: QtObject { property real blur: 0.6; property real opacity: 0.5 }
property QtObject high: QtObject { property real blur: 0.8; property real opacity: 0.65 }
}
property QtObject font: QtObject {
property string family: "JetBrainsMono Nerd Font"
}
}
@@ -0,0 +1,3 @@
singleton Theme 1.0 Theme.qml
TextField 1.0 TextField.qml
HintBar 1.0 HintBar.qml