Rename the Color singleton to avoid the Qt 6.12 clash

This commit is contained in:
SirBlob committed 2026-10-09 19:22:08 -04:00
1 parent 97854006b5
commit d92290c06c
93 files changed
+342 -342

No files matched your search

+1 -1
View File
@@ -9,7 +9,7 @@ plugin, so summoning a panel is an IPC call into a process that is already up.
``` ```
shell/ shell/
shell.qml entry point shell.qml entry point
Commons/ Style, Color, Border, Util Commons/ Style, Colors, Border, Util
Ui/ shared components Ui/ shared components
services/ plugin registry, bar widget registry, app library services/ plugin registry, bar widget registry, app library
plugins/ plugins/
+1 -1
View File
@@ -22,7 +22,7 @@ Named keys are preferred: `background`, `foreground`, `accent`, `muted`,
`color0`..`color15` form also works and is resolved through the same cascade: `color0`..`color15` form also works and is resolved through the same cascade:
`color0` is the background, `color4` is blue, `color5` is magenta. `color0` is the background, `color4` is blue, `color5` is magenta.
That cascade lives in `blob-theme-color`, and `Commons/Color.qml` mirrors it so That cascade lives in `blob-theme-color`, and `Commons/Colors.qml` mirrors it so
the shell and the CLI never disagree about what a slot means. the shell and the CLI never disagree about what a slot means.
## Templates ## Templates
+2 -2
View File
@@ -29,9 +29,9 @@ repeating literals.
The CSS was written against pywal's `@color0`, `@color4` and `@color5` aliases. The CSS was written against pywal's `@color0`, `@color4` and `@color5` aliases.
`blob-theme-color` resolves `color4` to blue and `color5` to magenta, so `blob-theme-color` resolves `color4` to blue and `color5` to magenta, so
`Commons/Color.qml` now exposes `blue` and `magenta` with that same cascade, `Commons/Colors.qml` now exposes `blue` and `magenta` with that same cascade,
falling back to `accent` for themes that define neither. `color0` is falling back to `accent` for themes that define neither. `color0` is
`background`, which Color already had. `background`, which Colors already had.
## Quick settings tabs ## Quick settings tabs
+4 -4
View File
@@ -8,21 +8,21 @@ make_scripts_executable() {
while IFS= read -r script; do while IFS= read -r script; do
not_executable+=("$script") not_executable+=("$script")
done < <(find "$repo_dir/bin" -maxdepth 1 -type f ! -perm -u+x | sort) done < <({ find "$repo_dir/bin" -maxdepth 1 -type f ! -perm -u+x; find "$repo_dir/shell" -type f -name '*.sh' ! -perm -u+x; } | sort)
if (( ${#not_executable[@]} == 0 )); then if (( ${#not_executable[@]} == 0 )); then
say "ok bin/ scripts executable" say "ok bin/ and shell/ scripts executable"
return 0 return 0
fi fi
note_change note_change
if [[ $check == true ]]; then if [[ $check == true ]]; then
say "would make ${#not_executable[@]} script(s) in bin/ executable" say "would make ${#not_executable[@]} script(s) in bin/ and shell/ executable"
return 0 return 0
fi fi
chmod +x "${not_executable[@]}" chmod +x "${not_executable[@]}"
say "chmod ${#not_executable[@]} script(s) in bin/" say "chmod ${#not_executable[@]} script(s) in bin/ and shell/"
} }
bar_has_widget() { bar_has_widget() {
+6 -6
View File
@@ -22,7 +22,7 @@ QtObject {
} }
function value(section, key) { function value(section, key) {
var v = Color.shellValues[section + "." + key] var v = Colors.shellValues[section + "." + key]
return (v === undefined || v === null) ? "" : v return (v === undefined || v === null) ? "" : v
} }
@@ -39,7 +39,7 @@ QtObject {
var seen = {} var seen = {}
while (s.match(/^[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$/) && !seen[s]) { while (s.match(/^[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$/) && !seen[s]) {
seen[s] = true seen[s] = true
var next = Color.shellValues[s] var next = Colors.shellValues[s]
if (next === undefined || next === null || String(next).length === 0) break if (next === undefined || next === null || String(next).length === 0) break
s = String(next).replace(/^\s+|\s+$/g, "") s = String(next).replace(/^\s+|\s+$/g, "")
} }
@@ -68,10 +68,10 @@ QtObject {
var s = String(color || "").replace(/^\s+|\s+$/g, "") var s = String(color || "").replace(/^\s+|\s+$/g, "")
var role = s.toLowerCase() var role = s.toLowerCase()
if (role === "foreground" || role === "text") return cssColor(Color.foreground, a) if (role === "foreground" || role === "text") return cssColor(Colors.foreground, a)
if (role === "accent") return cssColor(Color.accent, a) if (role === "accent") return cssColor(Colors.accent, a)
if (role === "urgent") return cssColor(Color.urgent, a) if (role === "urgent") return cssColor(Colors.urgent, a)
if (role === "background") return cssColor(Color.background, a) if (role === "background") return cssColor(Colors.background, a)
if (role === "transparent") return "transparent" if (role === "transparent") return "transparent"
return Geometry.canonicalColor(s, a) return Geometry.canonicalColor(s, a)
} }
@@ -186,7 +186,7 @@ QtObject {
property var themeShellValues: ({}) property var themeShellValues: ({})
property var userShellValues: ({}) property var userShellValues: ({})
// Single TOML walker for shell.toml. Both Color (surface roles) and Style // Single TOML walker for shell.toml. Both Colors (surface roles) and Style
// (typography, spacing, bar, control states) consume the resulting dict. // (typography, spacing, bar, control states) consume the resulting dict.
// Accepts quoted strings, bare numeric values, bare width lists, and bare // Accepts quoted strings, bare numeric values, bare width lists, and bare
// role names; tolerates inline comments. Numbers are kept as strings here — // role names; tolerates inline comments. Numbers are kept as strings here —
+22 -22
View File
@@ -3,7 +3,7 @@ import QtQuick
import Quickshell import Quickshell
import Quickshell.Io import Quickshell.Io
// Shared structural style tokens for the shell. Color is the palette // Shared structural style tokens for the shell. Colors is the palette
// singleton; Style holds everything else themes can influence — corner // singleton; Style holds everything else themes can influence — corner
// rounding, gap to screen edges, state affordances, spacing, typography // rounding, gap to screen edges, state affordances, spacing, typography
// scale, and bar dimensions. // scale, and bar dimensions.
@@ -113,27 +113,27 @@ QtObject {
} }
function resolveStateColor(token, foreground, accent, urgent, fallback) { function resolveStateColor(token, foreground, accent, urgent, fallback) {
var fb = fallback || foreground || Color.foreground var fb = fallback || foreground || Colors.foreground
var s = String(token || "").replace(/^\s+|\s+$/g, "") var s = String(token || "").replace(/^\s+|\s+$/g, "")
var role = s.toLowerCase() var role = s.toLowerCase()
if (role === "foreground" || role === "text") return foreground || Color.foreground if (role === "foreground" || role === "text") return foreground || Colors.foreground
if (role === "accent") return accent || Color.accent if (role === "accent") return accent || Colors.accent
if (role === "urgent") return urgent || Color.urgent if (role === "urgent") return urgent || Colors.urgent
if (role === "background") return Color.background if (role === "background") return Colors.background
if (role === "transparent") return Qt.rgba(0, 0, 0, 0) if (role === "transparent") return Qt.rgba(0, 0, 0, 0)
return colorFromHex(s, fb) return colorFromHex(s, fb)
} }
function normalStateColor(foreground, accent, urgent) { function normalStateColor(foreground, accent, urgent) {
return resolveStateColor(normalColorToken, foreground, accent, urgent, foreground || Color.foreground) return resolveStateColor(normalColorToken, foreground, accent, urgent, foreground || Colors.foreground)
} }
function hoverStateColor(foreground, accent, urgent) { function hoverStateColor(foreground, accent, urgent) {
return resolveStateColor(hoverColorToken, foreground, accent, urgent, foreground || Color.foreground) return resolveStateColor(hoverColorToken, foreground, accent, urgent, foreground || Colors.foreground)
} }
function selectedStateColor(foreground, accent, urgent) { function selectedStateColor(foreground, accent, urgent) {
return resolveStateColor(selectedColorToken, foreground, accent, urgent, foreground || Color.foreground) return resolveStateColor(selectedColorToken, foreground, accent, urgent, foreground || Colors.foreground)
} }
function pressedStateColor(foreground, accent, urgent) { function pressedStateColor(foreground, accent, urgent) {
@@ -148,7 +148,7 @@ QtObject {
} }
function selectionStateColor(foreground, accent, urgent) { function selectionStateColor(foreground, accent, urgent) {
return resolveStateColor(selectionColorToken, foreground, accent, urgent, foreground || Color.foreground) return resolveStateColor(selectionColorToken, foreground, accent, urgent, foreground || Colors.foreground)
} }
function normalFillFor(foreground, accent, urgent) { return Util.alpha(normalStateColor(foreground, accent, urgent), normalFillAlpha) } function normalFillFor(foreground, accent, urgent) { return Util.alpha(normalStateColor(foreground, accent, urgent), normalFillAlpha) }
@@ -186,17 +186,17 @@ QtObject {
} }
// Convenience colors resolved against the foundational palette. // Convenience colors resolved against the foundational palette.
readonly property color normalFill: normalFillFor(Color.foreground, Color.accent, Color.urgent) readonly property color normalFill: normalFillFor(Colors.foreground, Colors.accent, Colors.urgent)
readonly property color hoverFill: hoverFillFor(Color.foreground, Color.accent, Color.urgent) readonly property color hoverFill: hoverFillFor(Colors.foreground, Colors.accent, Colors.urgent)
readonly property color selectedFill: selectedFillFor(Color.foreground, Color.accent, Color.urgent) readonly property color selectedFill: selectedFillFor(Colors.foreground, Colors.accent, Colors.urgent)
readonly property color pressedFill: pressedFillFor(Color.foreground, Color.accent, Color.urgent) readonly property color pressedFill: pressedFillFor(Colors.foreground, Colors.accent, Colors.urgent)
readonly property color focusFillColor: focusFillFor(Color.foreground, Color.accent, Color.urgent) readonly property color focusFillColor: focusFillFor(Colors.foreground, Colors.accent, Colors.urgent)
readonly property color normalBorderColor: normalBorderFor(Color.foreground, Color.accent, Color.urgent) readonly property color normalBorderColor: normalBorderFor(Colors.foreground, Colors.accent, Colors.urgent)
readonly property color hoverBorderColor: hoverBorderFor(Color.foreground, Color.accent, Color.urgent) readonly property color hoverBorderColor: hoverBorderFor(Colors.foreground, Colors.accent, Colors.urgent)
readonly property color selectedBorderColor: selectedBorderFor(Color.foreground, Color.accent, Color.urgent) readonly property color selectedBorderColor: selectedBorderFor(Colors.foreground, Colors.accent, Colors.urgent)
readonly property color focusBorderColor: focusBorderFor(Color.foreground, Color.accent, Color.urgent) readonly property color focusBorderColor: focusBorderFor(Colors.foreground, Colors.accent, Colors.urgent)
readonly property color selectedAccentFill: Util.alpha(Color.accent, selectedFillAlpha) readonly property color selectedAccentFill: Util.alpha(Colors.accent, selectedFillAlpha)
readonly property color selectionFill: selectionFillFor(Color.foreground, Color.accent, Color.urgent) readonly property color selectionFill: selectionFillFor(Colors.foreground, Colors.accent, Colors.urgent)
// ---------------------------------------------------------- spacing // ---------------------------------------------------------- spacing
// //
@@ -379,7 +379,7 @@ QtObject {
} }
// Pull typography, bar dimensions, state tokens, and spacing out of the // Pull typography, bar dimensions, state tokens, and spacing out of the
// shell.toml dict that Color already parsed. Called by Color.loadShell so // shell.toml dict that Colors already parsed. Called by Colors.loadShell so
// a single parse pass feeds both singletons. // a single parse pass feeds both singletons.
function applyShellValues(values) { function applyShellValues(values) {
var fontOut = {} var fontOut = {}
+1 -1
View File
@@ -3,7 +3,7 @@ import Quickshell
import QtQuick import QtQuick
// Shared utility helpers used across plugins. Pure functions only — no // Shared utility helpers used across plugins. Pure functions only — no
// state. Anything stateful belongs on Color, Style, or a service. // state. Anything stateful belongs on Colors, Style, or a service.
QtObject { QtObject {
id: root id: root
+1 -1
View File
@@ -1,5 +1,5 @@
module qs.Commons module qs.Commons
singleton Border 1.0 Border.qml singleton Border 1.0 Border.qml
singleton Color 1.0 Color.qml singleton Colors 1.0 Colors.qml
singleton Style 1.0 Style.qml singleton Style 1.0 Style.qml
singleton Util 1.0 Util.qml singleton Util 1.0 Util.qml
+6 -6
View File
@@ -32,9 +32,9 @@ BorderSurface {
property bool bordered: false property bool bordered: false
// Colors. Defaults track the theme; per-instance overrides are honored. // Colors. Defaults track the theme; per-instance overrides are honored.
property color foreground: Color.foreground property color foreground: Colors.foreground
property color background: "transparent" property color background: "transparent"
property color accent: Color.accent property color accent: Colors.accent
// Sizing. // Sizing.
property string fontFamily: Style.font.family property string fontFamily: Style.font.family
@@ -54,9 +54,9 @@ BorderSurface {
// Tooltip palette. Auto-rendered if tooltipText is set. Defaults pull // Tooltip palette. Auto-rendered if tooltipText is set. Defaults pull
// from [tooltip] in shell.toml; override per-instance only when a button // from [tooltip] in shell.toml; override per-instance only when a button
// intentionally wants a tooltip that diverges from the theme. // intentionally wants a tooltip that diverges from the theme.
property color tooltipBackground: Color.tooltip.background property color tooltipBackground: Colors.tooltip.background
property color tooltipForeground: Color.tooltip.text property color tooltipForeground: Colors.tooltip.text
property color tooltipBorder: Color.tooltip.border property color tooltipBorder: Colors.tooltip.border
signal clicked() signal clicked()
signal rightClicked() signal rightClicked()
@@ -77,7 +77,7 @@ BorderSurface {
readonly property bool hot: mouseArea.containsMouse || hasCursor readonly property bool hot: mouseArea.containsMouse || hasCursor
readonly property bool _showFocusRing: focusable && activeFocus readonly property bool _showFocusRing: focusable && activeFocus
readonly property color _selectedColor: Style.selectedStateColor(root.foreground, root.accent) readonly property color _selectedColor: Style.selectedStateColor(root.foreground, root.accent)
readonly property var _tooltipBorderSpec: Border.localOrSurfaceSpec("tooltip", "border", root.tooltipBorder, Color.tooltip.border, Math.max(1, Style.normalBorderWidth)) readonly property var _tooltipBorderSpec: Border.localOrSurfaceSpec("tooltip", "border", root.tooltipBorder, Colors.tooltip.border, Math.max(1, Style.normalBorderWidth))
readonly property var _focusBorderSpec: Border.controlSpec("focus", root.foreground, root.accent) readonly property var _focusBorderSpec: Border.controlSpec("focus", root.foreground, root.accent)
readonly property var _hoverBorderSpec: Border.controlSpec("hover-cursor", root.foreground, root.accent) readonly property var _hoverBorderSpec: Border.controlSpec("hover-cursor", root.foreground, root.accent)
readonly property var _selectedBorderSpec: Border.controlSpec("selected", root.foreground, root.accent) readonly property var _selectedBorderSpec: Border.controlSpec("selected", root.foreground, root.accent)
+3 -3
View File
@@ -25,9 +25,9 @@ Row {
property var options: [] property var options: []
property string value: "" property string value: ""
property color foreground: Color.foreground property color foreground: Colors.foreground
property color background: Color.background property color background: Colors.background
property color accent: Color.accent property color accent: Colors.accent
property string fontFamily: Style.font.family property string fontFamily: Style.font.family
property real fontSize: Style.font.body property real fontSize: Style.font.body
property bool focusable: true property bool focusable: true
+7 -7
View File
@@ -29,13 +29,13 @@ Item {
width: root.calendar.weekColumnWidth width: root.calendar.weekColumnWidth
height: root.headerHeight height: root.headerHeight
radius: Style.cornerRadius radius: Style.cornerRadius
color: weekHeaderMouse.containsMouse ? Style.hoverFillFor(root.foreground, Color.accent) : "transparent" color: weekHeaderMouse.containsMouse ? Style.hoverFillFor(root.foreground, Colors.accent) : "transparent"
Text { Text {
anchors.centerIn: parent anchors.centerIn: parent
text: "W" text: "W"
color: weekHeaderMouse.containsMouse color: weekHeaderMouse.containsMouse
? Style.hoverStateColor(root.foreground, Color.accent) ? Style.hoverStateColor(root.foreground, Colors.accent)
: Qt.darker(root.foreground, 1.9) : Qt.darker(root.foreground, 1.9)
font.family: root.calendar.fontFamily font.family: root.calendar.fontFamily
font.pixelSize: Style.font.caption font.pixelSize: Style.font.caption
@@ -135,9 +135,9 @@ Item {
required property var modelData required property var modelData
readonly property color todayFill: Style.selectedStateColor(root.foreground, Color.accent) readonly property color todayFill: Style.selectedStateColor(root.foreground, Colors.accent)
readonly property color dayColor: { readonly property color dayColor: {
if (modelData.today) return Color.background if (modelData.today) return Colors.background
if (!modelData.inMonth) return root.foreground if (!modelData.inMonth) return root.foreground
return modelData.weekend ? Qt.darker(root.foreground, 1.45) : root.foreground return modelData.weekend ? Qt.darker(root.foreground, 1.45) : root.foreground
} }
@@ -147,12 +147,12 @@ Item {
radius: Style.cornerRadius radius: Style.cornerRadius
color: { color: {
if (modelData.today) return todayFill if (modelData.today) return todayFill
if (dayMouse.containsMouse) return Style.hoverFillFor(root.foreground, Color.accent) if (dayMouse.containsMouse) return Style.hoverFillFor(root.foreground, Colors.accent)
if (modelData.selected) return Style.selectedFillFor(root.foreground, Color.accent) if (modelData.selected) return Style.selectedFillFor(root.foreground, Colors.accent)
return "transparent" return "transparent"
} }
border.width: modelData.selected && !modelData.today ? Math.max(1, Style.spacing.hairline) : 0 border.width: modelData.selected && !modelData.today ? Math.max(1, Style.spacing.hairline) : 0
border.color: Style.selectedBorderFor(root.foreground, Color.accent) border.color: Style.selectedBorderFor(root.foreground, Colors.accent)
Text { Text {
anchors.centerIn: parent anchors.centerIn: parent
+4 -4
View File
@@ -34,18 +34,18 @@ Item {
height: (root.height - root.gap * (root.rows - 1)) / root.rows height: (root.height - root.gap * (root.rows - 1)) / root.rows
radius: Style.cornerRadius radius: Style.cornerRadius
color: { color: {
if (isCurrentMonth) return Style.selectedStateColor(root.foreground, Color.accent) if (isCurrentMonth) return Style.selectedStateColor(root.foreground, Colors.accent)
if (isCursor) return Style.hoverFillFor(root.foreground, Color.accent) if (isCursor) return Style.hoverFillFor(root.foreground, Colors.accent)
return "transparent" return "transparent"
} }
border.width: isViewedMonth && !isCurrentMonth ? Math.max(1, Style.spacing.hairline) : 0 border.width: isViewedMonth && !isCurrentMonth ? Math.max(1, Style.spacing.hairline) : 0
border.color: Style.selectedBorderFor(root.foreground, Color.accent) border.color: Style.selectedBorderFor(root.foreground, Colors.accent)
Text { Text {
anchors.centerIn: parent anchors.centerIn: parent
textFormat: Text.PlainText textFormat: Text.PlainText
text: root.calendar.monthLabel(monthCell.index) text: root.calendar.monthLabel(monthCell.index)
color: monthCell.isCurrentMonth ? Color.background : root.foreground color: monthCell.isCurrentMonth ? Colors.background : root.foreground
font.family: root.calendar.fontFamily font.family: root.calendar.fontFamily
font.pixelSize: Style.font.body font.pixelSize: Style.font.body
font.letterSpacing: 1 font.letterSpacing: 1
+3 -3
View File
@@ -7,7 +7,7 @@ Column {
property date today: new Date() property date today: new Date()
property int weekStart: CalendarModel.normalizedWeekStart(null, Qt.locale().firstDayOfWeek) property int weekStart: CalendarModel.normalizedWeekStart(null, Qt.locale().firstDayOfWeek)
property color foreground: Color.foreground property color foreground: Colors.foreground
property string fontFamily: Style.font.family property string fontFamily: Style.font.family
property bool showWeekNumbers: false property bool showWeekNumbers: false
property bool navigationAtBottom: false property bool navigationAtBottom: false
@@ -191,7 +191,7 @@ Column {
width: navigationLabel.width width: navigationLabel.width
height: navigationLabel.implicitHeight + Style.space(6) height: navigationLabel.implicitHeight + Style.space(6)
radius: Style.cornerRadius radius: Style.cornerRadius
color: navigationMouse.containsMouse ? Style.hoverFillFor(root.foreground, Color.accent) : "transparent" color: navigationMouse.containsMouse ? Style.hoverFillFor(root.foreground, Colors.accent) : "transparent"
} }
Text { Text {
@@ -204,7 +204,7 @@ Column {
? String(root.pickerYear) ? String(root.pickerYear)
: Qt.formatDate(root.viewDate, "MMMM yyyy").toUpperCase() : Qt.formatDate(root.viewDate, "MMMM yyyy").toUpperCase()
color: navigationMouse.containsMouse color: navigationMouse.containsMouse
? Style.hoverStateColor(root.foreground, Color.accent) ? Style.hoverStateColor(root.foreground, Colors.accent)
: Qt.darker(root.foreground, 1.4) : Qt.darker(root.foreground, 1.4)
font.family: root.fontFamily font.family: root.fontFamily
font.pixelSize: Style.font.body font.pixelSize: Style.font.body
+2 -2
View File
@@ -4,8 +4,8 @@ import qs.Commons
Rectangle { Rectangle {
id: root id: root
property color fillColor: Util.alpha(Color.background, Style.cardFillAlpha) property color fillColor: Util.alpha(Colors.background, Style.cardFillAlpha)
property color borderColor: Util.alpha(Color.blue, Style.cardBorderAlpha) property color borderColor: Util.alpha(Colors.blue, Style.cardBorderAlpha)
default property alias content: contentColumn.data default property alias content: contentColumn.data
property alias spacing: contentColumn.spacing property alias spacing: contentColumn.spacing
property int padding: Style.cardPadding property int padding: Style.cardPadding
+3 -3
View File
@@ -13,14 +13,14 @@ Row {
width: Style.spaceReal(28) width: Style.spaceReal(28)
height: width height: width
radius: Style.cardRadius radius: Style.cardRadius
color: Util.alpha(Color.blue, 0.2) color: Util.alpha(Colors.blue, 0.2)
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
Text { Text {
anchors.centerIn: parent anchors.centerIn: parent
text: root.icon text: root.icon
textFormat: Text.PlainText textFormat: Text.PlainText
color: Color.blue color: Colors.blue
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.body font.pixelSize: Style.font.body
} }
@@ -30,7 +30,7 @@ Row {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: root.title text: root.title
textFormat: Text.PlainText textFormat: Text.PlainText
color: Color.foreground color: Colors.foreground
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.body font.pixelSize: Style.font.body
font.bold: true font.bold: true
+3 -3
View File
@@ -12,14 +12,14 @@ Rectangle {
implicitHeight: Style.spaceReal(24) implicitHeight: Style.spaceReal(24)
radius: Style.cardRadius radius: Style.cardRadius
color: root.active color: root.active
? Color.accent ? Colors.accent
: (hover.hovered ? Util.alpha(Color.blue, 0.3) : Util.alpha(Color.foreground, 0.1)) : (hover.hovered ? Util.alpha(Colors.blue, 0.3) : Util.alpha(Colors.foreground, 0.1))
Text { Text {
anchors.centerIn: parent anchors.centerIn: parent
text: root.icon text: root.icon
textFormat: Text.PlainText textFormat: Text.PlainText
color: root.active ? Color.background : (hover.hovered ? Color.blue : Color.magenta) color: root.active ? Colors.background : (hover.hovered ? Colors.blue : Colors.magenta)
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.bodySmall font.pixelSize: Style.font.bodySmall
} }
+4 -4
View File
@@ -13,17 +13,17 @@ Rectangle {
radius: Style.cardRadius radius: Style.cardRadius
opacity: enabled ? 1 : 0.4 opacity: enabled ? 1 : 0.4
color: root.active color: root.active
? Color.accent ? Colors.accent
: (hover.hovered ? Util.alpha(Color.blue, 0.25) : Util.alpha(Color.background, Style.cardFillAlpha)) : (hover.hovered ? Util.alpha(Colors.blue, 0.25) : Util.alpha(Colors.background, Style.cardFillAlpha))
border.width: 1 border.width: 1
border.color: root.active ? Color.accent : Util.alpha(Color.blue, Style.cardBorderAlpha) border.color: root.active ? Colors.accent : Util.alpha(Colors.blue, Style.cardBorderAlpha)
Text { Text {
id: text id: text
anchors.centerIn: parent anchors.centerIn: parent
text: root.label text: root.label
textFormat: Text.PlainText textFormat: Text.PlainText
color: root.active ? Color.background : Color.foreground color: root.active ? Colors.background : Colors.foreground
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.bodySmall font.pixelSize: Style.font.bodySmall
} }
+8 -8
View File
@@ -9,11 +9,11 @@ Item {
property string cancelText: "Cancel" property string cancelText: "Cancel"
property string confirmText: "Confirm" property string confirmText: "Confirm"
property int selectedIndex: 1 property int selectedIndex: 1
property color background: Color.background property color background: Colors.background
property color foreground: Color.foreground property color foreground: Colors.foreground
property color scrim: Util.alpha(Color.background, 0.7) property color scrim: Util.alpha(Colors.background, 0.7)
property color selectedBackground: Util.alpha(Color.foreground, 0.08) property color selectedBackground: Util.alpha(Colors.foreground, 0.08)
property color selectedText: Color.accent property color selectedText: Colors.accent
property string fontFamily: Style.font.family property string fontFamily: Style.font.family
property int cornerRadius: Style.cornerRadius property int cornerRadius: Style.cornerRadius
@@ -98,10 +98,10 @@ Item {
width: Style.space(88) width: Style.space(88)
height: Style.space(34) height: Style.space(34)
color: selected color: selected
? (destructive ? Util.alpha(Color.urgent, 0.22) : root.selectedBackground) ? (destructive ? Util.alpha(Colors.urgent, 0.22) : root.selectedBackground)
: "transparent" : "transparent"
borderSpec: Border.flat(destructive borderSpec: Border.flat(destructive
? (selected ? Color.urgent : Util.alpha(Color.urgent, 0.56)) ? (selected ? Colors.urgent : Util.alpha(Colors.urgent, 0.56))
: (selected ? root.selectedText : Util.alpha(root.foreground, 0.38)), Style.normalBorderWidth) : (selected ? root.selectedText : Util.alpha(root.foreground, 0.38)), Style.normalBorderWidth)
radius: 0 radius: 0
@@ -109,7 +109,7 @@ Item {
textFormat: Text.PlainText textFormat: Text.PlainText
anchors.centerIn: parent anchors.centerIn: parent
text: modelData text: modelData
color: destructive ? (selected ? Color.urgent : root.foreground) : (selected ? root.selectedText : root.foreground) color: destructive ? (selected ? Colors.urgent : root.foreground) : (selected ? root.selectedText : root.foreground)
font.family: root.fontFamily font.family: root.fontFamily
font.pixelSize: Style.font.caption font.pixelSize: Style.font.caption
} }
+2 -2
View File
@@ -19,8 +19,8 @@ BorderSurface {
property bool outline: false property bool outline: false
property bool bordered: false property bool bordered: false
property color foreground: Color.foreground property color foreground: Colors.foreground
property color accent: Color.accent property color accent: Colors.accent
property color fill: Style.hoverFillFor(foreground, accent) property color fill: Style.hoverFillFor(foreground, accent)
property color currentFill: Style.selectedFillFor(foreground, accent) property color currentFill: Style.selectedFillFor(foreground, accent)
+7 -7
View File
@@ -3,8 +3,8 @@ import QtQuick.Controls
import qs.Commons import qs.Commons
// Themed single-select dropdown. Trigger row paints with the kit's focus // Themed single-select dropdown. Trigger row paints with the kit's focus
// chrome; the popup anchors below and uses Color.popups.background + // chrome; the popup anchors below and uses Colors.popups.background +
// Color.popups.border so it reads as a panel surface rather than the // Colors.popups.border so it reads as a panel surface rather than the
// platform-native ComboBox look. // platform-native ComboBox look.
// //
// `options` accepts either a plain string[] or an array of // `options` accepts either a plain string[] or an array of
@@ -22,11 +22,11 @@ Item {
property string value: "" property string value: ""
property var options: [] property var options: []
property color foreground: Color.popups.text property color foreground: Colors.popups.text
property color background: Color.popups.background property color background: Colors.popups.background
property color popupBorder: Color.popups.border property color popupBorder: Colors.popups.border
property color accent: Color.accent property color accent: Colors.accent
readonly property var popupBorderSpec: Border.localOrSurfaceSpec("popups", "border", popupBorder, Color.popups.border, Style.normalBorderWidth) readonly property var popupBorderSpec: Border.localOrSurfaceSpec("popups", "border", popupBorder, Colors.popups.border, Style.normalBorderWidth)
property string fontFamily: Style.font.family property string fontFamily: Style.font.family
property int rowHeight: Style.spacing.controlHeight property int rowHeight: Style.spacing.controlHeight
property int popupRowHeight: Style.spacing.popupRowHeight property int popupRowHeight: Style.spacing.popupRowHeight
+2 -2
View File
@@ -44,7 +44,7 @@ PanelWindow {
property int padding: Style.spacing.popupPadding property int padding: Style.spacing.popupPadding
property int contentWidth: Style.space(280) property int contentWidth: Style.space(280)
property int contentHeight: Style.space(200) property int contentHeight: Style.space(200)
property var borderSpec: Border.surfaceSpec("popups", "border", Color.popups.border, Math.max(1, Style.space(2))) property var borderSpec: Border.surfaceSpec("popups", "border", Colors.popups.border, Math.max(1, Style.space(2)))
property bool centerOnBar: false property bool centerOnBar: false
property bool open: false property bool open: false
property int gap: Style.gapsOut // distance between bar edge and panel property int gap: Style.gapsOut // distance between bar edge and panel
@@ -382,7 +382,7 @@ PanelWindow {
y: root.cardOrigin.y y: root.cardOrigin.y
width: root.contentWidth width: root.contentWidth
height: root.contentHeight height: root.contentHeight
color: Color.popups.background color: Colors.popups.background
borderSpec: root.borderSpec borderSpec: root.borderSpec
padding: root.padding padding: root.padding
radius: Style.cornerRadius radius: Style.cornerRadius
+5 -5
View File
@@ -22,7 +22,7 @@ Column {
width: Style.spaceReal(22) width: Style.spaceReal(22)
text: root.icon text: root.icon
textFormat: Text.PlainText textFormat: Text.PlainText
color: Color.magenta color: Colors.magenta
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.body font.pixelSize: Style.font.body
} }
@@ -34,7 +34,7 @@ Column {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: root.name text: root.name
textFormat: Text.PlainText textFormat: Text.PlainText
color: Color.foreground color: Colors.foreground
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.bodySmall font.pixelSize: Style.font.bodySmall
font.bold: true font.bold: true
@@ -45,7 +45,7 @@ Column {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: root.detail text: root.detail
textFormat: Text.PlainText textFormat: Text.PlainText
color: Util.alpha(Color.foreground, 0.8) color: Util.alpha(Colors.foreground, 0.8)
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.bodySmall font.pixelSize: Style.font.bodySmall
} }
@@ -55,13 +55,13 @@ Column {
width: parent.width width: parent.width
height: Style.spaceReal(8) height: Style.spaceReal(8)
radius: Style.cardRadius radius: Style.cardRadius
color: Util.alpha(Color.foreground, 0.2) color: Util.alpha(Colors.foreground, 0.2)
Rectangle { Rectangle {
width: parent.width * Math.max(0, Math.min(100, root.percent)) / 100 width: parent.width * Math.max(0, Math.min(100, root.percent)) / 100
height: parent.height height: parent.height
radius: Style.cardRadius radius: Style.cardRadius
color: Color.accent color: Colors.accent
Behavior on width { Behavior on width {
NumberAnimation { duration: 200 } NumberAnimation { duration: 200 }
+5 -5
View File
@@ -33,11 +33,11 @@ Item {
property string triggerLabel: "" property string triggerLabel: ""
property bool showLabel: true property bool showLabel: true
property color foreground: Color.popups.text property color foreground: Colors.popups.text
property color background: Color.popups.background property color background: Colors.popups.background
property color popupBorder: Color.popups.border property color popupBorder: Colors.popups.border
property color accent: Color.accent property color accent: Colors.accent
readonly property var popupBorderSpec: Border.localOrSurfaceSpec("popups", "border", popupBorder, Color.popups.border, Style.normalBorderWidth) readonly property var popupBorderSpec: Border.localOrSurfaceSpec("popups", "border", popupBorder, Colors.popups.border, Style.normalBorderWidth)
property string fontFamily: Style.font.family property string fontFamily: Style.font.family
property int rowHeight: Style.spacing.controlHeight property int rowHeight: Style.spacing.controlHeight
property int popupRowHeight: Style.spacing.popupRowHeight property int popupRowHeight: Style.spacing.popupRowHeight
+2 -2
View File
@@ -10,8 +10,8 @@ Column {
property int from: 0 property int from: 0
property int to: 100 property int to: 100
property int stepSize: 1 property int stepSize: 1
property color foreground: Color.foreground property color foreground: Colors.foreground
property color accent: Color.accent property color accent: Colors.accent
property string fontFamily: Style.font.family property string fontFamily: Style.font.family
property real fontSize: Style.font.body property real fontSize: Style.font.body
property real fieldWidth: Style.spacing.numberFieldWidth property real fieldWidth: Style.spacing.numberFieldWidth
+1 -1
View File
@@ -7,7 +7,7 @@ Item {
property string text: "" property string text: ""
property string fontFamily: Style.font.family property string fontFamily: Style.font.family
property real fontSize: Style.font.body property real fontSize: Style.font.body
property color color: Color.foreground property color color: Colors.foreground
property bool debugBounds: false property bool debugBounds: false
readonly property int renderedFontSize: Math.max(1, Math.round(fontSize)) readonly property int renderedFontSize: Math.max(1, Math.round(fontSize))
+1 -1
View File
@@ -19,7 +19,7 @@ Item {
property bool popoutSwitchClosing: false property bool popoutSwitchClosing: false
readonly property bool opened: panelController.open readonly property bool opened: panelController.open
readonly property color barForeground: bar ? bar.barForeground : Color.foreground readonly property color barForeground: bar ? bar.barForeground : Colors.foreground
function open() { panelController.show() } function open() { panelController.show() }
function close() { panelController.hide() } function close() { panelController.hide() }
+2 -2
View File
@@ -29,7 +29,7 @@ BorderSurface {
property string iconText: "" property string iconText: ""
property string tooltipText: "" property string tooltipText: ""
property color foreground: Color.foreground property color foreground: Colors.foreground
property color hoverColor: foreground property color hoverColor: foreground
property string fontFamily: Style.font.family property string fontFamily: Style.font.family
property real fontSize: Style.font.icon property real fontSize: Style.font.icon
@@ -57,7 +57,7 @@ BorderSurface {
? Border.controlSpec("focus", hoverColor, hoverColor) ? Border.controlSpec("focus", hoverColor, hoverColor)
: (_hot && bordered : (_hot && bordered
? Border.controlSpec("hover-cursor", hoverColor, hoverColor) ? Border.controlSpec("hover-cursor", hoverColor, hoverColor)
: (bordered ? Border.controlSpec("normal", foreground, Color.accent) : Border.none())) : (bordered ? Border.controlSpec("normal", foreground, Colors.accent) : Border.none()))
color: _showFocusRing color: _showFocusRing
? Style.focusFillFor(hoverColor, hoverColor) ? Style.focusFillFor(hoverColor, hoverColor)
+2 -2
View File
@@ -8,7 +8,7 @@ Item {
property string title: "" property string title: ""
property string meta: "" property string meta: ""
property string detail: "" property string detail: ""
property color foreground: Color.foreground property color foreground: Colors.foreground
property string fontFamily: Style.font.family property string fontFamily: Style.font.family
property real iconSize: Style.font.display property real iconSize: Style.font.display
property real iconOpacity: 1.0 property real iconOpacity: 1.0
@@ -71,7 +71,7 @@ Item {
implicitHeight: detailText.implicitHeight + Style.space(4) implicitHeight: detailText.implicitHeight + Style.space(4)
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
color: "transparent" color: "transparent"
borderSpec: Border.controlSpec("normal", root.foreground, Color.accent) borderSpec: Border.controlSpec("normal", root.foreground, Colors.accent)
radius: Style.cornerRadius radius: Style.cornerRadius
Text { Text {
+1 -1
View File
@@ -7,7 +7,7 @@ import qs.Commons
Text { Text {
id: root id: root
property color foreground: Color.foreground property color foreground: Colors.foreground
property string fontFamily: Style.font.family property string fontFamily: Style.font.family
property real fontSize: Style.font.caption property real fontSize: Style.font.caption
+1 -1
View File
@@ -7,7 +7,7 @@ import qs.Commons
Rectangle { Rectangle {
id: root id: root
property color foreground: Color.foreground property color foreground: Colors.foreground
property real strength: 0.12 property real strength: 0.12
width: parent ? parent.width : implicitWidth width: parent ? parent.width : implicitWidth
+4 -4
View File
@@ -10,9 +10,9 @@ Item {
property real maximum: 1 property real maximum: 1
property real step: 0.05 property real step: 0.05
property bool integer: false property bool integer: false
property color trackColor: bar ? Style.selectedFillFor(bar.foreground, Color.accent) : "#333" property color trackColor: bar ? Style.selectedFillFor(bar.foreground, Colors.accent) : "#333"
property color fillColor: bar ? bar.foreground : Color.foreground property color fillColor: bar ? bar.foreground : Colors.foreground
property color knobColor: bar ? bar.foreground : Color.foreground property color knobColor: bar ? bar.foreground : Colors.foreground
property bool dragging: false property bool dragging: false
property real trackHeight: Math.max(4, Math.round(Style.spacing.controlHeight * 0.11)) property real trackHeight: Math.max(4, Math.round(Style.spacing.controlHeight * 0.11))
property real knobSize: Math.max(14, Math.round(Style.spacing.controlHeight * 0.38)) property real knobSize: Math.max(14, Math.round(Style.spacing.controlHeight * 0.38))
@@ -23,7 +23,7 @@ Item {
// crossing the track shows). Purely visual — snapping is the caller's job via // crossing the track shows). Purely visual — snapping is the caller's job via
// `integer`/`step` or an index-based value. Default 0 leaves the track plain. // `integer`/`step` or an index-based value. Default 0 leaves the track plain.
property int tickCount: 0 property int tickCount: 0
property color tickColor: bar ? bar.background : Color.background property color tickColor: bar ? bar.background : Colors.background
onValueChanged: if (!dragging) liveValue = value onValueChanged: if (!dragging) liveValue = value
+5 -5
View File
@@ -9,7 +9,7 @@ import qs.Commons
// text: "Forget network" // text: "Forget network"
// } // }
// //
// Defaults pull from [tooltip] in shell.toml via Color.tooltip.*. Override // Defaults pull from [tooltip] in shell.toml via Colors.tooltip.*. Override
// the panel* properties per-instance only when you need a tooltip that // the panel* properties per-instance only when you need a tooltip that
// intentionally diverges from the theme. // intentionally diverges from the theme.
// //
@@ -18,13 +18,13 @@ import qs.Commons
ToolTip { ToolTip {
id: root id: root
property color panelForeground: Color.tooltip.text property color panelForeground: Colors.tooltip.text
property color panelBackground: Color.tooltip.background property color panelBackground: Colors.tooltip.background
property color panelBorder: Color.tooltip.border property color panelBorder: Colors.tooltip.border
property string fontFamily: Style.font.family property string fontFamily: Style.font.family
property real fontSize: Style.font.bodySmall property real fontSize: Style.font.bodySmall
readonly property var panelBorderSpec: Border.localOrSurfaceSpec("tooltip", "border", panelBorder, Color.tooltip.border, Style.normalBorderWidth) readonly property var panelBorderSpec: Border.localOrSurfaceSpec("tooltip", "border", panelBorder, Colors.tooltip.border, Style.normalBorderWidth)
delay: 400 delay: 400
padding: 0 padding: 0
+3 -3
View File
@@ -13,8 +13,8 @@ PopupWindow {
property int padding: Style.spacing.popupPadding property int padding: Style.spacing.popupPadding
property int contentWidth: Style.space(280) property int contentWidth: Style.space(280)
property int contentHeight: Style.space(200) property int contentHeight: Style.space(200)
property color borderColor: Color.popups.border property color borderColor: Colors.popups.border
property var borderSpec: Border.localOrSurfaceSpec("popups", "border", borderColor, Color.popups.border, Math.max(1, Style.space(2))) property var borderSpec: Border.localOrSurfaceSpec("popups", "border", borderColor, Colors.popups.border, Math.max(1, Style.space(2)))
property bool open: false property bool open: false
property bool centerOnBar: false property bool centerOnBar: false
// "click" — uses HyprlandFocusGrab so clicking outside dismisses the popup. // "click" — uses HyprlandFocusGrab so clicking outside dismisses the popup.
@@ -150,7 +150,7 @@ PopupWindow {
BorderSurface { BorderSurface {
id: card id: card
anchors.fill: parent anchors.fill: parent
color: Color.popups.background color: Colors.popups.background
borderSpec: root.borderSpec borderSpec: root.borderSpec
padding: root.padding padding: root.padding
radius: Style.cornerRadius radius: Style.cornerRadius
+5 -5
View File
@@ -25,11 +25,11 @@ Item {
property string emptyText: "No matches" property string emptyText: "No matches"
property string triggerLabel: "" property string triggerLabel: ""
property color foreground: Color.popups.text property color foreground: Colors.popups.text
property color background: Color.popups.background property color background: Colors.popups.background
property color popupBorder: Color.popups.border property color popupBorder: Colors.popups.border
property color accent: Color.accent property color accent: Colors.accent
readonly property var popupBorderSpec: Border.localOrSurfaceSpec("popups", "border", popupBorder, Color.popups.border, Style.normalBorderWidth) readonly property var popupBorderSpec: Border.localOrSurfaceSpec("popups", "border", popupBorder, Colors.popups.border, Style.normalBorderWidth)
property string fontFamily: Style.font.family property string fontFamily: Style.font.family
property int rowHeight: Style.spacing.controlHeight property int rowHeight: Style.spacing.controlHeight
property int popupRowHeight: Style.spacing.popupRowHeight property int popupRowHeight: Style.spacing.popupRowHeight
+4 -4
View File
@@ -288,7 +288,7 @@ PanelWindow {
// round caps would leave a stray dot at the foot of the scale. // round caps would leave a stray dot at the foot of the scale.
ShapePath { ShapePath {
strokeWidth: dial.arcWidth * 3 strokeWidth: dial.arcWidth * 3
strokeColor: dial.arcVisible ? Qt.rgba(Color.accent.r, Color.accent.g, Color.accent.b, 0.18) : "transparent" strokeColor: dial.arcVisible ? Qt.rgba(Colors.accent.r, Colors.accent.g, Colors.accent.b, 0.18) : "transparent"
fillColor: "transparent" fillColor: "transparent"
capStyle: ShapePath.RoundCap capStyle: ShapePath.RoundCap
@@ -305,7 +305,7 @@ PanelWindow {
// Value: fills behind the needle. // Value: fills behind the needle.
ShapePath { ShapePath {
strokeWidth: dial.arcWidth strokeWidth: dial.arcWidth
strokeColor: dial.arcVisible ? Color.accent : "transparent" strokeColor: dial.arcVisible ? Colors.accent : "transparent"
fillColor: "transparent" fillColor: "transparent"
capStyle: ShapePath.RoundCap capStyle: ShapePath.RoundCap
@@ -356,8 +356,8 @@ PanelWindow {
radius: width / 2 radius: width / 2
gradient: Gradient { gradient: Gradient {
GradientStop { position: 0.0; color: Color.accent } GradientStop { position: 0.0; color: Colors.accent }
GradientStop { position: 0.55; color: Color.accent } GradientStop { position: 0.55; color: Colors.accent }
GradientStop { position: 1.0; color: "transparent" } GradientStop { position: 1.0; color: "transparent" }
} }
} }
+3 -3
View File
@@ -17,7 +17,7 @@ Item {
width: Style.spaceReal(22) width: Style.spaceReal(22)
text: root.icon text: root.icon
textFormat: Text.PlainText textFormat: Text.PlainText
color: Color.magenta color: Colors.magenta
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.body font.pixelSize: Style.font.body
} }
@@ -29,7 +29,7 @@ Item {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: root.label text: root.label
textFormat: Text.PlainText textFormat: Text.PlainText
color: Color.foreground color: Colors.foreground
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.bodySmall font.pixelSize: Style.font.bodySmall
} }
@@ -43,7 +43,7 @@ Item {
elide: Text.ElideRight elide: Text.ElideRight
text: root.value text: root.value
textFormat: Text.PlainText textFormat: Text.PlainText
color: Color.foreground color: Colors.foreground
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.bodySmall font.pixelSize: Style.font.bodySmall
font.bold: true font.bold: true
+2 -2
View File
@@ -18,8 +18,8 @@ import qs.Commons
TextField { TextField {
id: root id: root
property color foreground: Color.foreground property color foreground: Colors.foreground
property color accent: Color.accent property color accent: Colors.accent
property color selectionTint: Style.selectionFillFor(foreground, accent) property color selectionTint: Style.selectionFillFor(foreground, accent)
property bool password: false property bool password: false
property real horizontalPadding: Style.spacing.controlPaddingX property real horizontalPadding: Style.spacing.controlPaddingX
+2 -2
View File
@@ -28,8 +28,8 @@ BorderSurface {
// Override per-instance if a caller wants the opposite. // Override per-instance if a caller wants the opposite.
property bool rounded: Style.cornerRadius > 0 property bool rounded: Style.cornerRadius > 0
property color foreground: Color.foreground property color foreground: Colors.foreground
property color accent: Color.accent property color accent: Colors.accent
property string fontFamily: Style.font.family property string fontFamily: Style.font.family
property real titleSize: Style.font.subtitle property real titleSize: Style.font.subtitle
property real descriptionSize: Style.font.caption property real descriptionSize: Style.font.caption
+2 -2
View File
@@ -40,8 +40,8 @@ Item {
property bool cursorRing: interactive property bool cursorRing: interactive
property int cursorPad: Style.space(6) property int cursorPad: Style.space(6)
property bool rounded: Style.cornerRadius > 0 property bool rounded: Style.cornerRadius > 0
property color foreground: Color.foreground property color foreground: Colors.foreground
property color accent: Color.accent property color accent: Colors.accent
signal toggled() signal toggled()
signal hovered(bool isHovered) signal hovered(bool isHovered)
+2 -2
View File
@@ -8,8 +8,8 @@ Item {
property string text: "" property string text: ""
property string fontFamily: bar ? bar.fontFamily : Style.font.family property string fontFamily: bar ? bar.fontFamily : Style.font.family
property real fontSize: Style.font.body property real fontSize: Style.font.body
property color foreground: bar ? bar.barForeground : Color.foreground property color foreground: bar ? bar.barForeground : Colors.foreground
property color activeColor: bar ? bar.urgent : Color.urgent property color activeColor: bar ? bar.urgent : Colors.urgent
property bool active: false property bool active: false
property real horizontalMargin: 8.5 property real horizontalMargin: 8.5
property real verticalPadding: 6 property real verticalPadding: 6
+6 -6
View File
@@ -10,10 +10,10 @@ Panel {
ipcTarget: "blob.agents" ipcTarget: "blob.agents"
manageIpc: false manageIpc: false
readonly property color foreground: bar ? bar.foreground : Color.foreground readonly property color foreground: bar ? bar.foreground : Colors.foreground
readonly property color urgent: Color.urgent readonly property color urgent: Colors.urgent
readonly property color dim: Qt.darker(foreground, 1.55) readonly property color dim: Qt.darker(foreground, 1.55)
readonly property color track: Style.selectedFillFor(foreground, Color.accent) readonly property color track: Style.selectedFillFor(foreground, Colors.accent)
readonly property string fontFamily: bar ? bar.fontFamily : Style.font.family readonly property string fontFamily: bar ? bar.fontFamily : Style.font.family
readonly property string barGlyph: "󱚣" readonly property string barGlyph: "󱚣"
readonly property string launchCommand: "blob-launch-terminal claude" readonly property string launchCommand: "blob-launch-terminal claude"
@@ -253,15 +253,15 @@ Panel {
implicitWidth: Style.space(34) implicitWidth: Style.space(34)
implicitHeight: implicitWidth implicitHeight: implicitWidth
radius: Style.cornerRadius radius: Style.cornerRadius
color: Util.alpha(Color.accent, heroMouse.containsMouse ? 0.3 : 0.12) color: Util.alpha(Colors.accent, heroMouse.containsMouse ? 0.3 : 0.12)
border.width: heroMouse.containsMouse ? Math.max(1, Style.hoverBorderWidth) : 0 border.width: heroMouse.containsMouse ? Math.max(1, Style.hoverBorderWidth) : 0
border.color: Color.accent border.color: Colors.accent
Text { Text {
anchors.centerIn: parent anchors.centerIn: parent
textFormat: Text.PlainText textFormat: Text.PlainText
text: heroButton.glyph text: heroButton.glyph
color: Color.accent color: Colors.accent
font.family: root.fontFamily font.family: root.fontFamily
font.pixelSize: Style.font.heading font.pixelSize: Style.font.heading
} }
+3 -3
View File
@@ -104,10 +104,10 @@ Item {
// pending; the latest theme payload should still apply. // pending; the latest theme payload should still apply.
if (pendingThemeVersion < 0) return if (pendingThemeVersion < 0) return
pendingThemeFallbackTimer.stop() pendingThemeFallbackTimer.stop()
Color.loadColors(pendingColorsRaw) Colors.loadColors(pendingColorsRaw)
// Color.loadShell also refreshes Style so the type scale flips with the // Colors.loadShell also refreshes Style so the type scale flips with the
// background reveal instead of waiting for a separate reload path. // background reveal instead of waiting for a separate reload path.
Color.loadShell(pendingShellRaw) Colors.loadShell(pendingShellRaw)
Style.scheduleRefresh() Style.scheduleRefresh()
pendingThemeVersion = -1 pendingThemeVersion = -1
pendingColorsRaw = "" pendingColorsRaw = ""
+11 -11
View File
@@ -68,16 +68,16 @@ Item {
// to "monospace"), so changing the system font (via `blob-font-set`) // to "monospace"), so changing the system font (via `blob-font-set`)
// updates the bar without a reload. // updates the bar without a reload.
property string fontFamily: Style.font.family property string fontFamily: Style.font.family
// Bound to the central Color singleton so the bar tracks shell.toml's // Bound to the central Colors singleton so the bar tracks shell.toml's
// [bar] section. Property names kept for the rest of this file's bindings. // [bar] section. Property names kept for the rest of this file's bindings.
property color themeForeground: Color.bar.text property color themeForeground: Colors.bar.text
property color themeContrastForeground: Color.background property color themeContrastForeground: Colors.background
property color transparentForeground: Color.bar.text property color transparentForeground: Colors.bar.text
property color foreground: themeForeground property color foreground: themeForeground
property color barForeground: useTransparentForeground ? transparentForeground : themeForeground property color barForeground: useTransparentForeground ? transparentForeground : themeForeground
property bool foregroundAnimationEnabled: true property bool foregroundAnimationEnabled: true
property color background: Color.bar.background property color background: Colors.bar.background
property color urgent: Color.bar.active property color urgent: Colors.bar.active
Behavior on barForeground { enabled: root.foregroundAnimationEnabled; ColorAnimation { duration: 420; easing.type: Easing.InOutCubic } } Behavior on barForeground { enabled: root.foregroundAnimationEnabled; ColorAnimation { duration: 420; easing.type: Easing.InOutCubic } }
Behavior on background { ColorAnimation { duration: 420; easing.type: Easing.InOutCubic } } Behavior on background { ColorAnimation { duration: 420; easing.type: Easing.InOutCubic } }
@@ -1249,8 +1249,8 @@ Item {
id: tooltipBubble id: tooltipBubble
implicitWidth: tooltipLabel.implicitWidth + 20 implicitWidth: tooltipLabel.implicitWidth + 20
implicitHeight: tooltipLabel.implicitHeight + 14 implicitHeight: tooltipLabel.implicitHeight + 14
color: Color.tooltip.background color: Colors.tooltip.background
borderSpec: Border.surfaceSpec("tooltip", "border", Color.tooltip.border, 1) borderSpec: Border.surfaceSpec("tooltip", "border", Colors.tooltip.border, 1)
radius: Style.cornerRadius radius: Style.cornerRadius
Text { Text {
@@ -1258,7 +1258,7 @@ Item {
textFormat: Text.PlainText textFormat: Text.PlainText
anchors.centerIn: parent anchors.centerIn: parent
text: root.tooltipText text: root.tooltipText
color: Color.tooltip.text color: Colors.tooltip.text
font.family: root.fontFamily font.family: root.fontFamily
font.pixelSize: Style.font.body font.pixelSize: Style.font.body
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
@@ -1377,7 +1377,7 @@ Item {
y: targetRect ? Math.round(targetRect.y) : 0 y: targetRect ? Math.round(targetRect.y) : 0
width: targetRect ? targetRect.width : 0 width: targetRect ? targetRect.width : 0
height: targetRect ? targetRect.height : 0 height: targetRect ? targetRect.height : 0
color: Color.accent color: Colors.accent
radius: Math.min(width, height) / 2 radius: Math.min(width, height) / 2
} }
} }
@@ -1673,7 +1673,7 @@ Item {
visible: opacity > 0 visible: opacity > 0
opacity: slot.panelOpen && !slot.dragSource ? 0.9 : 0 opacity: slot.panelOpen && !slot.dragSource ? 0.9 : 0
color: Color.accent color: Colors.accent
radius: Math.min(width, height) / 2 radius: Math.min(width, height) / 2
width: root.vertical ? Style.space(2) : slot.panelIndicatorExtent width: root.vertical ? Style.space(2) : slot.panelIndicatorExtent
height: root.vertical ? slot.panelIndicatorExtent : Style.space(2) height: root.vertical ? slot.panelIndicatorExtent : Style.space(2)
+1 -1
View File
@@ -34,7 +34,7 @@ BarWidget {
anchors.left: parent.left anchors.left: parent.left
width: parent.width width: parent.width
text: root.title text: root.title
color: root.bar ? root.bar.barForeground : Color.foreground color: root.bar ? root.bar.barForeground : Colors.foreground
font.family: root.bar ? root.bar.fontFamily : Style.font.family font.family: root.bar ? root.bar.fontFamily : Style.font.family
font.pixelSize: Style.font.body font.pixelSize: Style.font.body
elide: Text.ElideRight elide: Text.ElideRight
+3 -3
View File
@@ -16,7 +16,7 @@ BarWidget {
property bool trayMenuOpen: false property bool trayMenuOpen: false
property var activeTrayItem: null property var activeTrayItem: null
property var activeTrayAnchor: null property var activeTrayAnchor: null
readonly property color foreground: bar ? bar.foreground : Color.foreground readonly property color foreground: bar ? bar.foreground : Colors.foreground
readonly property string fontFamily: bar ? bar.fontFamily : Style.font.family readonly property string fontFamily: bar ? bar.fontFamily : Style.font.family
readonly property var pinnedIds: settings.pinned instanceof Array ? settings.pinned : [] readonly property var pinnedIds: settings.pinned instanceof Array ? settings.pinned : []
readonly property var hiddenIds: settings.hidden instanceof Array ? settings.hidden : [] readonly property var hiddenIds: settings.hidden instanceof Array ? settings.hidden : []
@@ -617,7 +617,7 @@ BarWidget {
anchors.rightMargin: Style.space(10) anchors.rightMargin: Style.space(10)
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
height: 1 height: 1
color: Color.popups.border color: Colors.popups.border
opacity: 0.45 opacity: 0.45
} }
} }
@@ -671,7 +671,7 @@ BarWidget {
anchors.rightMargin: Style.space(10) anchors.rightMargin: Style.space(10)
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
height: 1 height: 1
color: Color.popups.border color: Colors.popups.border
opacity: 0.45 opacity: 0.45
} }
+6 -6
View File
@@ -22,13 +22,13 @@ Item {
// Shares the [menu] surface tokens — themes that style the menu also // Shares the [menu] surface tokens — themes that style the menu also
// style the clipboard. Selected-row colors composed in the // style the clipboard. Selected-row colors composed in the
// singleton so consumers drop them straight into Rectangle bindings. // singleton so consumers drop them straight into Rectangle bindings.
property color background: Color.menu.background property color background: Colors.menu.background
property color foreground: Color.menu.text property color foreground: Colors.menu.text
property color border: Color.menu.border property color border: Colors.menu.border
property var borderSpec: Border.surfaceSpec("menu", "border", border, Math.max(1, Style.space(2))) property var borderSpec: Border.surfaceSpec("menu", "border", border, Math.max(1, Style.space(2)))
property color scrim: Color.menu.scrim property color scrim: Colors.menu.scrim
property color selectedBackground: Color.menu.selectedBackground property color selectedBackground: Colors.menu.selectedBackground
property color selectedText: Color.menu.selectedText property color selectedText: Colors.menu.selectedText
readonly property int cornerRadius: Style.cornerRadius readonly property int cornerRadius: Style.cornerRadius
property string fontFamily: Style.font.menuFamily property string fontFamily: Style.font.menuFamily
property int contentMargin: Style.spacing.panelPadding property int contentMargin: Style.spacing.panelPadding
View File
File mode changed.
+6 -6
View File
@@ -23,13 +23,13 @@ Item {
// Shares the [menu] surface tokens — themes that style the menu also // Shares the [menu] surface tokens — themes that style the menu also
// style emojis. Selected-cell colors composed in the // style emojis. Selected-cell colors composed in the
// singleton so consumers drop them straight into Rectangle bindings. // singleton so consumers drop them straight into Rectangle bindings.
property color background: Color.menu.background property color background: Colors.menu.background
property color foreground: Color.menu.text property color foreground: Colors.menu.text
property color border: Color.menu.border property color border: Colors.menu.border
property var borderSpec: Border.surfaceSpec("menu", "border", border, Math.max(1, Style.space(2))) property var borderSpec: Border.surfaceSpec("menu", "border", border, Math.max(1, Style.space(2)))
property color scrim: Color.menu.scrim property color scrim: Colors.menu.scrim
property color selectedBackground: Color.menu.selectedBackground property color selectedBackground: Colors.menu.selectedBackground
property color selectedText: Color.menu.selectedText property color selectedText: Colors.menu.selectedText
readonly property int cornerRadius: Style.cornerRadius readonly property int cornerRadius: Style.cornerRadius
property string fontFamily: Style.font.menuFamily property string fontFamily: Style.font.menuFamily
property int contentMargin: Style.spacing.panelPadding property int contentMargin: Style.spacing.panelPadding
+6 -6
View File
@@ -30,14 +30,14 @@ Item {
property string doneFile: "" property string doneFile: ""
property string filterText: "" property string filterText: ""
property var doneFilesToRelease: [] property var doneFilesToRelease: []
// Bound to the central [image-picker] section in shell.toml via Color.qml. // Bound to the central [image-picker] section in shell.toml via Colors.qml.
// `dimColor` tints unselected slices and text outlines on top of the scrim; // `dimColor` tints unselected slices and text outlines on top of the scrim;
// it intentionally tracks the foundational background, not a surface role. // it intentionally tracks the foundational background, not a surface role.
property color dimColor: Color.background property color dimColor: Colors.background
property color foreground: Color.imagePicker.text property color foreground: Colors.imagePicker.text
property color scrim: Color.imagePicker.scrim property color scrim: Colors.imagePicker.scrim
property color selectedBorder: Color.imagePicker.selectedBorder property color selectedBorder: Colors.imagePicker.selectedBorder
property color unselectedBorder: Color.imagePicker.unselectedBorder property color unselectedBorder: Colors.imagePicker.unselectedBorder
property int expandedWidth: 768 property int expandedWidth: 768
property int expandedHeight: 475 property int expandedHeight: 475
property int sliceWidth: 108 property int sliceWidth: 108
View File
File mode changed.
+14 -14
View File
@@ -45,11 +45,11 @@ Item {
readonly property int dateFontSize: Math.round(Style.font.heading * 1.125) readonly property int dateFontSize: Math.round(Style.font.heading * 1.125)
readonly property bool inputActive: passwordText.length > 0 || authenticatingPassword readonly property bool inputActive: passwordText.length > 0 || authenticatingPassword
readonly property color inputRestingBorder: paletteColor4.length > 0 ? paletteColor4 : Color.accent readonly property color inputRestingBorder: paletteColor4.length > 0 ? paletteColor4 : Colors.accent
readonly property color inputBorderColor: errorState readonly property color inputBorderColor: errorState
? Color.urgent ? Colors.urgent
: (inputActive ? Color.accent : Util.alpha(root.inputRestingBorder, 0.5)) : (inputActive ? Colors.accent : Util.alpha(root.inputRestingBorder, 0.5))
readonly property color inputBackground: Util.alpha(Color.background, 0.6) readonly property color inputBackground: Util.alpha(Colors.background, 0.6)
readonly property var inputBorderSpec: Border.flat(root.inputBorderColor, root.outlineThickness) readonly property var inputBorderSpec: Border.flat(root.inputBorderColor, root.outlineThickness)
signal submitPassword(string password) signal submitPassword(string password)
@@ -107,7 +107,7 @@ Item {
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
color: Color.background color: Colors.background
Image { Image {
id: wallpaper id: wallpaper
@@ -148,7 +148,7 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
text: Qt.formatDateTime(clock.date, "HH:mm") text: Qt.formatDateTime(clock.date, "HH:mm")
textFormat: Text.PlainText textFormat: Text.PlainText
color: Color.lock.text color: Colors.lock.text
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: root.clockFontSize font.pixelSize: root.clockFontSize
} }
@@ -157,7 +157,7 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
text: Qt.formatDateTime(clock.date, "dddd, d MMMM") text: Qt.formatDateTime(clock.date, "dddd, d MMMM")
textFormat: Text.PlainText textFormat: Text.PlainText
color: Color.lock.placeholder color: Colors.lock.placeholder
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: root.dateFontSize font.pixelSize: root.dateFontSize
} }
@@ -173,7 +173,7 @@ Item {
visible: root.brandingText.length > 0 && height > 0 visible: root.brandingText.length > 0 && height > 0
text: root.brandingText text: root.brandingText
textFormat: Text.PlainText textFormat: Text.PlainText
color: Color.lock.text color: Colors.lock.text
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: root.brandingMaxFontSize font.pixelSize: root.brandingMaxFontSize
minimumPixelSize: 4 minimumPixelSize: 4
@@ -210,16 +210,16 @@ Item {
echoMode: TextInput.Password echoMode: TextInput.Password
passwordCharacter: "\u25CF" passwordCharacter: "\u25CF"
passwordMaskDelay: 0 passwordMaskDelay: 0
color: Color.lock.text color: Colors.lock.text
selectionColor: Color.lock.selection selectionColor: Colors.lock.selection
selectedTextColor: Color.lock.text selectedTextColor: Colors.lock.text
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: text.length > 0 ? Math.max(1, Math.floor(root.passwordDotFontSize * root.passwordDotScale)) : root.fieldFontSize font.pixelSize: text.length > 0 ? Math.max(1, Math.floor(root.passwordDotFontSize * root.passwordDotScale)) : root.fieldFontSize
font.letterSpacing: text.length > 0 ? root.passwordDotLetterSpacing * root.passwordDotScale : 0 font.letterSpacing: text.length > 0 ? root.passwordDotLetterSpacing * root.passwordDotScale : 0
cursorVisible: activeFocus && root.showPasswordCursor && text.length > 0 cursorVisible: activeFocus && root.showPasswordCursor && text.length > 0
cursorDelegate: Rectangle { cursorDelegate: Rectangle {
width: 2 width: 2
color: Color.lock.text color: Colors.lock.text
visible: passwordInput.cursorVisible visible: passwordInput.cursorVisible
} }
@@ -251,7 +251,7 @@ Item {
anchors.fill: passwordInput anchors.fill: passwordInput
text: root.authenticatingPassword ? "Checking…" : (root.failureMessage.length > 0 ? root.failureMessage : root.placeholderText) text: root.authenticatingPassword ? "Checking…" : (root.failureMessage.length > 0 ? root.failureMessage : root.placeholderText)
visible: passwordInput.text.length === 0 visible: passwordInput.text.length === 0
color: root.authenticatingPassword ? Color.lock.text : (root.failureMessage.length > 0 ? Color.lock.textError : Color.lock.placeholder) color: root.authenticatingPassword ? Colors.lock.text : (root.failureMessage.length > 0 ? Colors.lock.textError : Colors.lock.placeholder)
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: root.fieldFontSize font.pixelSize: root.fieldFontSize
font.italic: !root.authenticatingPassword && root.failureMessage.length > 0 font.italic: !root.authenticatingPassword && root.failureMessage.length > 0
@@ -271,7 +271,7 @@ Item {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
visible: root.fingerprintConfigured visible: root.fingerprintConfigured
text: "󰈷" text: "󰈷"
color: Color.lock.placeholder color: Colors.lock.placeholder
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Math.round(root.fieldFontSize * 1.1) font.pixelSize: Math.round(root.fieldFontSize * 1.1)
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
+1 -1
View File
@@ -263,7 +263,7 @@ Item {
WlSessionLockSurface { WlSessionLockSurface {
id: lockSurface id: lockSurface
color: Color.background color: Colors.background
LockView { LockView {
id: lockView id: lockView
+8 -8
View File
@@ -81,17 +81,17 @@ Item {
property bool deleteConfirmOpen: false property bool deleteConfirmOpen: false
property var deleteTarget: null property var deleteTarget: null
onOpenedChanged: if (!opened) { deleteConfirmOpen = false; deleteTarget = null } onOpenedChanged: if (!opened) { deleteConfirmOpen = false; deleteTarget = null }
// Bound to the central [menu] section in shell.toml via Color.qml. // Bound to the central [menu] section in shell.toml via Colors.qml.
// Each color already includes its alpha companion (composed in the // Each color already includes its alpha companion (composed in the
// singleton), so consumers can drop them straight into a Rectangle. // singleton), so consumers can drop them straight into a Rectangle.
property color background: Color.menu.background property color background: Colors.menu.background
property color foreground: Color.menu.text property color foreground: Colors.menu.text
property color border: Color.menu.border property color border: Colors.menu.border
property var borderSpec: Border.surfaceSpec("menu", "border", border, Math.max(1, Style.space(2))) property var borderSpec: Border.surfaceSpec("menu", "border", border, Math.max(1, Style.space(2)))
property color scrim: Color.menu.scrim property color scrim: Colors.menu.scrim
property color selectedBackground: Color.menu.selectedBackground property color selectedBackground: Colors.menu.selectedBackground
property color selectedText: Color.menu.selectedText property color selectedText: Colors.menu.selectedText
property color selectedBorder: Color.menu.selectedBorder property color selectedBorder: Colors.menu.selectedBorder
property var selectedBorderSpec: Border.surfaceSpec("menu", "selected-border", selectedBorder, 0) property var selectedBorderSpec: Border.surfaceSpec("menu", "selected-border", selectedBorder, 0)
readonly property real rowReservedBorderLeft: Border.left(selectedBorderSpec) readonly property real rowReservedBorderLeft: Border.left(selectedBorderSpec)
readonly property real rowReservedBorderRight: Border.right(selectedBorderSpec) readonly property real rowReservedBorderRight: Border.right(selectedBorderSpec)
@@ -124,7 +124,7 @@ Item {
anchors.rightMargin: Style.spaceReal(10) anchors.rightMargin: Style.spaceReal(10)
implicitWidth: Style.spaceReal(440) implicitWidth: Style.spaceReal(440)
implicitHeight: Style.spaceReal(420) implicitHeight: Style.spaceReal(420)
fillColor: Util.alpha(Color.background, Style.panelFillAlpha) fillColor: Util.alpha(Colors.background, Style.panelFillAlpha)
spacing: Style.spaceReal(10) spacing: Style.spaceReal(10)
Item { Item {
@@ -137,7 +137,7 @@ Item {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: "Notifications" text: "Notifications"
textFormat: Text.PlainText textFormat: Text.PlainText
color: Color.foreground color: Colors.foreground
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.body font.pixelSize: Style.font.body
font.bold: true font.bold: true
@@ -189,7 +189,7 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
text: "\uf0a2" text: "\uf0a2"
textFormat: Text.PlainText textFormat: Text.PlainText
color: Util.alpha(Color.blue, 0.6) color: Util.alpha(Colors.blue, 0.6)
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.heading font.pixelSize: Style.font.heading
} }
@@ -198,7 +198,7 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
text: "No notifications" text: "No notifications"
textFormat: Text.PlainText textFormat: Text.PlainText
color: Util.alpha(Color.foreground, 0.6) color: Util.alpha(Colors.foreground, 0.6)
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.bodySmall font.pixelSize: Style.font.bodySmall
} }
@@ -10,7 +10,7 @@ Rectangle {
signal dismissRequested() signal dismissRequested()
radius: Style.cardRadius radius: Style.cardRadius
color: Util.alpha(Color.background, Style.cardFillAlpha) color: Util.alpha(Colors.background, Style.cardFillAlpha)
implicitHeight: layout.implicitHeight + Style.spaceReal(20) implicitHeight: layout.implicitHeight + Style.spaceReal(20)
Rectangle { Rectangle {
@@ -18,7 +18,7 @@ Rectangle {
anchors.top: parent.top anchors.top: parent.top
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
width: Style.spaceReal(3) width: Style.spaceReal(3)
color: Color.accent color: Colors.accent
} }
Column { Column {
@@ -40,7 +40,7 @@ Rectangle {
anchors.left: parent.left anchors.left: parent.left
text: root.app.length > 0 ? root.app : "Notification" text: root.app.length > 0 ? root.app : "Notification"
textFormat: Text.PlainText textFormat: Text.PlainText
color: Color.accent color: Colors.accent
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.bodySmall font.pixelSize: Style.font.bodySmall
font.bold: true font.bold: true
@@ -50,7 +50,7 @@ Rectangle {
anchors.right: parent.right anchors.right: parent.right
text: "\uf00d" text: "\uf00d"
textFormat: Text.PlainText textFormat: Text.PlainText
color: closeHover.hovered ? Color.urgent : Color.magenta color: closeHover.hovered ? Colors.urgent : Colors.magenta
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.bodySmall font.pixelSize: Style.font.bodySmall
@@ -69,7 +69,7 @@ Rectangle {
text: root.summary text: root.summary
textFormat: Text.PlainText textFormat: Text.PlainText
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
color: Color.foreground color: Colors.foreground
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.bodySmall font.pixelSize: Style.font.bodySmall
font.bold: true font.bold: true
@@ -83,7 +83,7 @@ Rectangle {
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
maximumLineCount: 4 maximumLineCount: 4
elide: Text.ElideRight elide: Text.ElideRight
color: Util.alpha(Color.foreground, 0.8) color: Util.alpha(Colors.foreground, 0.8)
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.bodySmall font.pixelSize: Style.font.bodySmall
} }
@@ -46,10 +46,10 @@ BorderSurface {
readonly property string sanitizedBody: sanitizeBody(body) readonly property string sanitizedBody: sanitizeBody(body)
readonly property string styledBody: NotificationLogic.styledBody(body, app, appIcon) readonly property string styledBody: NotificationLogic.styledBody(body, app, appIcon)
readonly property color dimColor: Qt.darker(Color.notifications.text, 1.4) readonly property color dimColor: Qt.darker(Colors.notifications.text, 1.4)
readonly property color bodyColor: Qt.darker(Color.notifications.text, 1.15) readonly property color bodyColor: Qt.darker(Colors.notifications.text, 1.15)
readonly property color accentColor: urgency === 2 ? Color.urgent : (urgency === 0 ? dimColor : Color.notifications.countdown) readonly property color accentColor: urgency === 2 ? Colors.urgent : (urgency === 0 ? dimColor : Colors.notifications.countdown)
readonly property var cardBorderSpec: Border.surfaceSpec("notifications", "border", Color.notifications.border, Math.max(1, Style.space(2))) readonly property var cardBorderSpec: Border.surfaceSpec("notifications", "border", Colors.notifications.border, Math.max(1, Style.space(2)))
function sanitizeBody(s) { function sanitizeBody(s) {
return NotificationLogic.sanitizeBody(s, app, appIcon) return NotificationLogic.sanitizeBody(s, app, appIcon)
@@ -68,7 +68,7 @@ BorderSurface {
// doesn't push content under the bottom edge. // doesn't push content under the bottom edge.
implicitHeight: mainColumn.implicitHeight + borderTop + borderBottom implicitHeight: mainColumn.implicitHeight + borderTop + borderBottom
radius: cornerRadius radius: cornerRadius
color: Color.notifications.background color: Colors.notifications.background
borderSpec: cardBorderSpec borderSpec: cardBorderSpec
clip: true clip: true
@@ -137,7 +137,7 @@ BorderSurface {
anchors.centerIn: parent anchors.centerIn: parent
visible: root.hasGlyph && smallIconImage.status !== Image.Ready visible: root.hasGlyph && smallIconImage.status !== Image.Ready
text: root.glyph text: root.glyph
color: Color.notifications.text color: Colors.notifications.text
font.family: root.fontFamily font.family: root.fontFamily
font.pixelSize: Style.font.displayLarge font.pixelSize: Style.font.displayLarge
} }
@@ -148,7 +148,7 @@ BorderSurface {
Layout.alignment: Qt.AlignVCenter Layout.alignment: Qt.AlignVCenter
visible: root.compactGlyph visible: root.compactGlyph
text: root.glyph text: root.glyph
color: Color.notifications.text color: Colors.notifications.text
font.family: root.fontFamily font.family: root.fontFamily
font.pixelSize: Style.font.icon font.pixelSize: Style.font.icon
} }
@@ -168,7 +168,7 @@ BorderSurface {
visible: root.summary.length > 0 visible: root.summary.length > 0
text: root.summary text: root.summary
font.family: "Liberation Sans" font.family: "Liberation Sans"
color: Color.notifications.text color: Colors.notifications.text
font.pixelSize: Style.font.title font.pixelSize: Style.font.title
font.bold: true font.bold: true
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
+6 -6
View File
@@ -143,8 +143,8 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.bottomMargin: Style.space(67) anchors.bottomMargin: Style.space(67)
color: Util.alpha(Color.background, 0.97) color: Util.alpha(Colors.background, 0.97)
borderSpec: Border.surfaceSpec("popups", "border", Color.popups.border, Math.max(1, Style.space(2))) borderSpec: Border.surfaceSpec("popups", "border", Colors.popups.border, Math.max(1, Style.space(2)))
radius: Style.cornerRadius radius: Style.cornerRadius
opacity: root.opened ? 1 : 0 opacity: root.opened ? 1 : 0
@@ -166,7 +166,7 @@ Item {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: root.icon text: root.icon
font: iconMetrics.font font: iconMetrics.font
color: Color.popups.text color: Colors.popups.text
} }
} }
Rectangle { Rectangle {
@@ -174,11 +174,11 @@ Item {
width: root.barWidth width: root.barWidth
height: Math.max(Style.space(6), Style.spacing.sm) height: Math.max(Style.space(6), Style.spacing.sm)
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
color: Util.alpha(Color.popups.text, 0.45) color: Util.alpha(Colors.popups.text, 0.45)
Rectangle { Rectangle {
height: parent.height height: parent.height
width: parent.width * (root.hasProgress ? root.value / root.maxValue : 0) width: parent.width * (root.hasProgress ? root.value / root.maxValue : 0)
color: Color.accent color: Colors.accent
Behavior on width { Behavior on width {
enabled: root.opened enabled: root.opened
@@ -196,7 +196,7 @@ Item {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: root.message text: root.message
font: messageMetrics.font font: messageMetrics.font
color: Color.popups.text color: Colors.popups.text
elide: Text.ElideRight elide: Text.ElideRight
maximumLineCount: 1 maximumLineCount: 1
} }
+2 -2
View File
@@ -177,10 +177,10 @@ Panel {
readonly property string toggleHint: anyAudible ? "Mute" : "Unmute" readonly property string toggleHint: anyAudible ? "Mute" : "Unmute"
readonly property color hoverFill: bar readonly property color hoverFill: bar
? Style.hoverFillFor(bar.foreground, Color.accent) ? Style.hoverFillFor(bar.foreground, Colors.accent)
: "transparent" : "transparent"
readonly property color selectedFill: bar readonly property color selectedFill: bar
? Style.selectedFillFor(bar.foreground, Color.accent) ? Style.selectedFillFor(bar.foreground, Colors.accent)
: "transparent" : "transparent"
function sectionCount(section) { function sectionCount(section) {
+2 -2
View File
@@ -104,10 +104,10 @@ Panel {
readonly property string toggleHint: root.adapter && root.adapter.enabled ? "Turn Bluetooth off" : "Turn Bluetooth on" readonly property string toggleHint: root.adapter && root.adapter.enabled ? "Turn Bluetooth off" : "Turn Bluetooth on"
readonly property color hoverFill: bar readonly property color hoverFill: bar
? Style.hoverFillFor(bar.foreground, Color.accent) ? Style.hoverFillFor(bar.foreground, Colors.accent)
: "transparent" : "transparent"
readonly property color selectedFill: bar readonly property color selectedFill: bar
? Style.selectedFillFor(bar.foreground, Color.accent) ? Style.selectedFillFor(bar.foreground, Colors.accent)
: "transparent" : "transparent"
function sectionCount(section) { function sectionCount(section) {
+1 -1
View File
@@ -152,7 +152,7 @@ Panel {
text: root.errorMessage !== "" ? root.errorMessage : "Loading usage..." text: root.errorMessage !== "" ? root.errorMessage : "Loading usage..."
textFormat: Text.PlainText textFormat: Text.PlainText
wrapMode: Text.Wrap wrapMode: Text.Wrap
color: root.errorMessage !== "" ? Color.urgent : Qt.darker(root.barForeground, 1.5) color: root.errorMessage !== "" ? Colors.urgent : Qt.darker(root.barForeground, 1.5)
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.bodySmall font.pixelSize: Style.font.bodySmall
} }
+5 -5
View File
@@ -63,7 +63,7 @@ Panel {
// Guarded so the widget renders before the bar is injected (the bar-widget // Guarded so the widget renders before the bar is injected (the bar-widget
// contract instantiates it bare). // contract instantiates it bare).
readonly property color contentForeground: bar ? bar.foreground : Color.foreground readonly property color contentForeground: bar ? bar.foreground : Colors.foreground
readonly property string contentFontFamily: bar ? bar.fontFamily : Style.font.family readonly property string contentFontFamily: bar ? bar.fontFamily : Style.font.family
function open() { function open() {
@@ -266,7 +266,7 @@ Panel {
anchors.baseline: heroDate.baseline anchors.baseline: heroDate.baseline
text: "󰃭" text: "󰃭"
color: heroMouse.containsMouse color: heroMouse.containsMouse
? Style.hoverStateColor(root.contentForeground, Color.accent) ? Style.hoverStateColor(root.contentForeground, Colors.accent)
: root.contentForeground : root.contentForeground
font.family: root.contentFontFamily font.family: root.contentFontFamily
// Decorative, and deliberately outside the Style.font.* // Decorative, and deliberately outside the Style.font.*
@@ -281,7 +281,7 @@ Panel {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: Qt.formatDate(root.today, "MMMM d") text: Qt.formatDate(root.today, "MMMM d")
color: heroMouse.containsMouse color: heroMouse.containsMouse
? Style.hoverStateColor(root.contentForeground, Color.accent) ? Style.hoverStateColor(root.contentForeground, Colors.accent)
: root.contentForeground : root.contentForeground
font.family: root.contentFontFamily font.family: root.contentFontFamily
font.pixelSize: 52 font.pixelSize: 52
@@ -419,7 +419,7 @@ Panel {
width: Math.round(parent.width * root.yearDone) width: Math.round(parent.width * root.yearDone)
height: parent.height height: parent.height
radius: parent.radius radius: parent.radius
color: Style.selectedStateColor(root.contentForeground, Color.accent) color: Style.selectedStateColor(root.contentForeground, Colors.accent)
Behavior on width { NumberAnimation { duration: 160; easing.type: Easing.OutCubic } } Behavior on width { NumberAnimation { duration: 160; easing.type: Easing.OutCubic } }
} }
@@ -477,7 +477,7 @@ Panel {
width: Math.round(parent.width * root.lifeDone) width: Math.round(parent.width * root.lifeDone)
height: parent.height height: parent.height
radius: parent.radius radius: parent.radius
color: Style.selectedStateColor(root.contentForeground, Color.accent) color: Style.selectedStateColor(root.contentForeground, Colors.accent)
Behavior on width { NumberAnimation { duration: 160; easing.type: Easing.OutCubic } } Behavior on width { NumberAnimation { duration: 160; easing.type: Easing.OutCubic } }
} }
@@ -154,7 +154,7 @@ Item {
anchors.centerIn: parent anchors.centerIn: parent
implicitWidth: Math.min(Style.spaceReal(720), panelWindow.width - screenMargin * 2) implicitWidth: Math.min(Style.spaceReal(720), panelWindow.width - screenMargin * 2)
fillColor: Util.alpha(Color.background, Style.panelFillAlpha) fillColor: Util.alpha(Colors.background, Style.panelFillAlpha)
spacing: Style.spaceReal(10) spacing: Style.spaceReal(10)
Item { Item {
@@ -171,7 +171,7 @@ Item {
text: "Display layout" text: "Display layout"
textFormat: Text.PlainText textFormat: Text.PlainText
elide: Text.ElideRight elide: Text.ElideRight
color: Color.foreground color: Colors.foreground
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.body font.pixelSize: Style.font.body
font.bold: true font.bold: true
@@ -192,7 +192,7 @@ Item {
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
text: "Drag a monitor to move it. Edges snap to a neighbour. Changes apply as you drop and last until the session ends." text: "Drag a monitor to move it. Edges snap to a neighbour. Changes apply as you drop and last until the session ends."
textFormat: Text.PlainText textFormat: Text.PlainText
color: Util.alpha(Color.foreground, 0.6) color: Util.alpha(Colors.foreground, 0.6)
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.bodySmall font.pixelSize: Style.font.bodySmall
} }
@@ -19,10 +19,10 @@ Rectangle {
Math.max(1, width - Style.spaceReal(24)), Math.max(1, width - Style.spaceReal(24)),
Math.max(1, height - Style.spaceReal(24))) Math.max(1, height - Style.spaceReal(24)))
color: Util.alpha(Color.background, 0.35) color: Util.alpha(Colors.background, 0.35)
radius: Style.cardRadius radius: Style.cardRadius
border.width: 1 border.width: 1
border.color: Util.alpha(Color.foreground, 0.15) border.color: Util.alpha(Colors.foreground, 0.15)
clip: true clip: true
Item { Item {
@@ -53,7 +53,7 @@ Rectangle {
visible: root.monitors.length === 0 visible: root.monitors.length === 0
text: "No monitors reported" text: "No monitors reported"
textFormat: Text.PlainText textFormat: Text.PlainText
color: Util.alpha(Color.foreground, 0.6) color: Util.alpha(Colors.foreground, 0.6)
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.bodySmall font.pixelSize: Style.font.bodySmall
} }
@@ -25,10 +25,10 @@ Rectangle {
radius: Style.cardRadius radius: Style.cardRadius
color: root.selected color: root.selected
? Util.alpha(Color.accent, 0.35) ? Util.alpha(Colors.accent, 0.35)
: Util.alpha(Color.background, Style.cardFillAlpha) : Util.alpha(Colors.background, Style.cardFillAlpha)
border.width: Style.cardBorderWidth border.width: Style.cardBorderWidth
border.color: root.selected ? Color.accent : Util.alpha(Color.blue, Style.cardBorderAlpha) border.color: root.selected ? Colors.accent : Util.alpha(Colors.blue, Style.cardBorderAlpha)
clip: true clip: true
Column { Column {
@@ -42,7 +42,7 @@ Rectangle {
elide: Text.ElideRight elide: Text.ElideRight
text: root.name text: root.name
textFormat: Text.PlainText textFormat: Text.PlainText
color: Color.foreground color: Colors.foreground
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.bodySmall font.pixelSize: Style.font.bodySmall
font.bold: true font.bold: true
@@ -55,7 +55,7 @@ Rectangle {
visible: root.height > Style.spaceReal(44) visible: root.height > Style.spaceReal(44)
text: root.monitor ? root.monitor.width + "x" + root.monitor.height : "" text: root.monitor ? root.monitor.width + "x" + root.monitor.height : ""
textFormat: Text.PlainText textFormat: Text.PlainText
color: Util.alpha(Color.foreground, 0.7) color: Util.alpha(Colors.foreground, 0.7)
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.bodySmall font.pixelSize: Style.font.bodySmall
} }
@@ -67,7 +67,7 @@ Rectangle {
visible: root.monitor && root.monitor.focused && root.height > Style.spaceReal(58) visible: root.monitor && root.monitor.focused && root.height > Style.spaceReal(58)
text: "focused" text: "focused"
textFormat: Text.PlainText textFormat: Text.PlainText
color: Color.blue color: Colors.blue
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.bodySmall font.pixelSize: Style.font.bodySmall
} }
@@ -24,7 +24,7 @@ Column {
text: root.monitor ? root.monitor.name : "" text: root.monitor ? root.monitor.name : ""
textFormat: Text.PlainText textFormat: Text.PlainText
elide: Text.ElideRight elide: Text.ElideRight
color: Color.foreground color: Colors.foreground
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.body font.pixelSize: Style.font.body
font.bold: true font.bold: true
@@ -35,7 +35,7 @@ Column {
text: root.monitor ? root.monitor.description : "" text: root.monitor ? root.monitor.description : ""
textFormat: Text.PlainText textFormat: Text.PlainText
elide: Text.ElideRight elide: Text.ElideRight
color: Util.alpha(Color.foreground, 0.65) color: Util.alpha(Colors.foreground, 0.65)
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.bodySmall font.pixelSize: Style.font.bodySmall
} }
@@ -57,7 +57,7 @@ Column {
Text { Text {
text: "Mode" text: "Mode"
textFormat: Text.PlainText textFormat: Text.PlainText
color: Util.alpha(Color.foreground, 0.75) color: Util.alpha(Colors.foreground, 0.75)
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.bodySmall font.pixelSize: Style.font.bodySmall
} }
@@ -81,7 +81,7 @@ Column {
Text { Text {
text: "Scale" text: "Scale"
textFormat: Text.PlainText textFormat: Text.PlainText
color: Util.alpha(Color.foreground, 0.75) color: Util.alpha(Colors.foreground, 0.75)
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.bodySmall font.pixelSize: Style.font.bodySmall
} }
@@ -107,7 +107,7 @@ Column {
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
text: "Only scales that land on whole pixels are offered. Hyprland steps in 1/120 and rejects the rest." text: "Only scales that land on whole pixels are offered. Hyprland steps in 1/120 and rejects the rest."
textFormat: Text.PlainText textFormat: Text.PlainText
color: Util.alpha(Color.foreground, 0.55) color: Util.alpha(Colors.foreground, 0.55)
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.bodySmall font.pixelSize: Style.font.bodySmall
} }
+3 -3
View File
@@ -126,7 +126,7 @@ Item {
anchors.centerIn: parent anchors.centerIn: parent
implicitWidth: Style.spaceReal(720) implicitWidth: Style.spaceReal(720)
implicitHeight: Style.spaceReal(520) implicitHeight: Style.spaceReal(520)
fillColor: Util.alpha(Color.background, Style.panelFillAlpha) fillColor: Util.alpha(Colors.background, Style.panelFillAlpha)
spacing: Style.spaceReal(10) spacing: Style.spaceReal(10)
Item { Item {
@@ -139,7 +139,7 @@ Item {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: "Wallpapers" text: "Wallpapers"
textFormat: Text.PlainText textFormat: Text.PlainText
color: Color.foreground color: Colors.foreground
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.body font.pixelSize: Style.font.body
font.bold: true font.bold: true
@@ -191,7 +191,7 @@ Item {
? root.selectedName + ": " + root.assignedPath.replace(/^.*\//, "") ? root.selectedName + ": " + root.assignedPath.replace(/^.*\//, "")
: root.selectedName + ": following the global wallpaper") : root.selectedName + ": following the global wallpaper")
textFormat: Text.PlainText textFormat: Text.PlainText
color: Util.alpha(Color.foreground, 0.7) color: Util.alpha(Colors.foreground, 0.7)
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.bodySmall font.pixelSize: Style.font.bodySmall
} }
@@ -57,11 +57,11 @@ Item {
anchors.fill: parent anchors.fill: parent
anchors.margins: Style.spaceReal(3) anchors.margins: Style.spaceReal(3)
radius: Style.cardRadius radius: Style.cardRadius
color: Util.alpha(Color.background, Style.cardFillAlpha) color: Util.alpha(Colors.background, Style.cardFillAlpha)
border.width: Style.cardBorderWidth border.width: Style.cardBorderWidth
border.color: modelData === root.assignedPath border.color: modelData === root.assignedPath
? Color.accent ? Colors.accent
: (hover.hovered ? Color.blue : Util.alpha(Color.blue, Style.cardBorderAlpha)) : (hover.hovered ? Colors.blue : Util.alpha(Colors.blue, Style.cardBorderAlpha))
clip: true clip: true
Image { Image {
@@ -81,7 +81,7 @@ Item {
anchors.margins: Style.cardBorderWidth anchors.margins: Style.cardBorderWidth
height: caption.implicitHeight + Style.spaceReal(4) height: caption.implicitHeight + Style.spaceReal(4)
visible: hover.hovered || modelData === root.assignedPath visible: hover.hovered || modelData === root.assignedPath
color: Util.alpha(Color.background, 0.8) color: Util.alpha(Colors.background, 0.8)
Text { Text {
id: caption id: caption
@@ -91,7 +91,7 @@ Item {
elide: Text.ElideMiddle elide: Text.ElideMiddle
text: String(modelData).replace(/^.*\//, "") text: String(modelData).replace(/^.*\//, "")
textFormat: Text.PlainText textFormat: Text.PlainText
color: Color.foreground color: Colors.foreground
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.bodySmall font.pixelSize: Style.font.bodySmall
} }
@@ -113,7 +113,7 @@ Item {
visible: root.wallpapers.length === 0 visible: root.wallpapers.length === 0
text: "No images in " + root.directory text: "No images in " + root.directory
textFormat: Text.PlainText textFormat: Text.PlainText
color: Util.alpha(Color.foreground, 0.6) color: Util.alpha(Colors.foreground, 0.6)
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.bodySmall font.pixelSize: Style.font.bodySmall
} }
@@ -31,9 +31,9 @@ Rectangle {
implicitHeight: form.implicitHeight + Style.spaceReal(24) implicitHeight: form.implicitHeight + Style.spaceReal(24)
radius: Style.cardRadius radius: Style.cardRadius
color: Util.alpha(Color.foreground, 0.06) color: Util.alpha(Colors.foreground, 0.06)
border.width: 1 border.width: 1
border.color: Util.alpha(Color.accent, 0.6) border.color: Util.alpha(Colors.accent, 0.6)
Column { Column {
id: form id: form
@@ -47,7 +47,7 @@ Rectangle {
text: !root.binding ? "New binding" text: !root.binding ? "New binding"
: (root.binding.origin === "personal" ? "Edit binding" : "Replace default binding") : (root.binding.origin === "personal" ? "Edit binding" : "Replace default binding")
textFormat: Text.PlainText textFormat: Text.PlainText
color: Color.foreground color: Colors.foreground
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.bodySmall font.pixelSize: Style.font.bodySmall
font.bold: true font.bold: true
@@ -86,7 +86,7 @@ Rectangle {
? "Replaces your binding: " + root.conflict.description ? "Replaces your binding: " + root.conflict.description
: "Disables the default: " + root.conflict.description) : "Disables the default: " + root.conflict.description)
textFormat: Text.PlainText textFormat: Text.PlainText
color: Color.urgent color: Colors.urgent
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.caption font.pixelSize: Style.font.caption
} }
+6 -6
View File
@@ -22,7 +22,7 @@ Rectangle {
implicitHeight: Style.spaceReal(46) implicitHeight: Style.spaceReal(46)
radius: Style.cardRadius radius: Style.cardRadius
color: hover.hovered ? Util.alpha(Color.foreground, 0.08) : Util.alpha(Color.background, Style.cardFillAlpha) color: hover.hovered ? Util.alpha(Colors.foreground, 0.08) : Util.alpha(Colors.background, Style.cardFillAlpha)
HoverHandler { HoverHandler {
id: hover id: hover
@@ -36,9 +36,9 @@ Rectangle {
width: Style.spaceReal(200) width: Style.spaceReal(200)
height: Style.spaceReal(26) height: Style.spaceReal(26)
radius: Style.cardRadius radius: Style.cardRadius
color: root.personal ? Util.alpha(Color.accent, 0.25) : Util.alpha(Color.foreground, 0.1) color: root.personal ? Util.alpha(Colors.accent, 0.25) : Util.alpha(Colors.foreground, 0.1)
border.width: 1 border.width: 1
border.color: root.personal ? Color.accent : Util.alpha(Color.foreground, 0.2) border.color: root.personal ? Colors.accent : Util.alpha(Colors.foreground, 0.2)
opacity: root.active ? 1 : 0.5 opacity: root.active ? 1 : 0.5
Text { Text {
@@ -49,7 +49,7 @@ Rectangle {
text: root.binding ? root.binding.keys : "" text: root.binding ? root.binding.keys : ""
textFormat: Text.PlainText textFormat: Text.PlainText
elide: Text.ElideRight elide: Text.ElideRight
color: Color.foreground color: Colors.foreground
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.bodySmall font.pixelSize: Style.font.bodySmall
font.bold: true font.bold: true
@@ -70,7 +70,7 @@ Rectangle {
text: root.binding ? root.binding.description : "" text: root.binding ? root.binding.description : ""
textFormat: Text.PlainText textFormat: Text.PlainText
elide: Text.ElideRight elide: Text.ElideRight
color: Color.foreground color: Colors.foreground
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.bodySmall font.pixelSize: Style.font.bodySmall
font.bold: true font.bold: true
@@ -81,7 +81,7 @@ Rectangle {
text: root.stateText text: root.stateText
textFormat: Text.PlainText textFormat: Text.PlainText
elide: Text.ElideRight elide: Text.ElideRight
color: root.active ? Util.alpha(Color.foreground, 0.6) : Color.urgent color: root.active ? Util.alpha(Colors.foreground, 0.6) : Colors.urgent
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.caption font.pixelSize: Style.font.caption
} }
+2 -2
View File
@@ -136,7 +136,7 @@ Item {
anchors.centerIn: parent anchors.centerIn: parent
implicitWidth: Math.min(Style.spaceReal(760), panelWindow.width - screenMargin * 2) implicitWidth: Math.min(Style.spaceReal(760), panelWindow.width - screenMargin * 2)
implicitHeight: Math.min(Style.spaceReal(640), panelWindow.height - screenMargin * 2) implicitHeight: Math.min(Style.spaceReal(640), panelWindow.height - screenMargin * 2)
fillColor: Util.alpha(Color.background, Style.panelFillAlpha) fillColor: Util.alpha(Colors.background, Style.panelFillAlpha)
spacing: Style.spaceReal(10) spacing: Style.spaceReal(10)
KeybindsHeader { KeybindsHeader {
@@ -214,7 +214,7 @@ Item {
text: root.statusText.length > 0 ? root.statusText text: root.statusText.length > 0 ? root.statusText
: root.visibleBindings.length + " bindings. Changes go to ~/.config/hypr/bindings.lua and Hyprland reloads." : root.visibleBindings.length + " bindings. Changes go to ~/.config/hypr/bindings.lua and Hyprland reloads."
textFormat: Text.PlainText textFormat: Text.PlainText
color: root.statusIsError ? Color.urgent : Util.alpha(Color.foreground, 0.6) color: root.statusIsError ? Colors.urgent : Util.alpha(Colors.foreground, 0.6)
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.caption font.pixelSize: Style.font.caption
} }
@@ -19,7 +19,7 @@ Item {
text: "Keybindings" text: "Keybindings"
textFormat: Text.PlainText textFormat: Text.PlainText
elide: Text.ElideRight elide: Text.ElideRight
color: Color.foreground color: Colors.foreground
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.body font.pixelSize: Style.font.body
font.bold: true font.bold: true
+2 -2
View File
@@ -867,8 +867,8 @@ Panel {
onHasCursorChanged: if (hasCursor) root.ensureCursorVisible(monitorRow) onHasCursorChanged: if (hasCursor) root.ensureCursorVisible(monitorRow)
current: isFocused current: isFocused
foreground: root.bar.foreground foreground: root.bar.foreground
fill: Style.hoverFillFor(root.bar.foreground, Color.accent) fill: Style.hoverFillFor(root.bar.foreground, Colors.accent)
currentFill: Style.selectedFillFor(root.bar.foreground, Color.accent) currentFill: Style.selectedFillFor(root.bar.foreground, Colors.accent)
implicitHeight: monitorInner.implicitHeight + Style.spacing.xl implicitHeight: monitorInner.implicitHeight + Style.spacing.xl
opacity: canToggle ? 1.0 : 0.45 opacity: canToggle ? 1.0 : 0.45
+3 -3
View File
@@ -299,8 +299,8 @@ Panel {
// `selectedIndex`). Mouse hover and keyboard nav both mutate this state // `selectedIndex`). Mouse hover and keyboard nav both mutate this state
// at the root; items never read containsMouse for visuals. See // at the root; items never read containsMouse for visuals. See
// CursorSurface for the shared chrome shared by rows and pills. // CursorSurface for the shared chrome shared by rows and pills.
readonly property color hoverFill: bar ? Style.hoverFillFor(bar.foreground, Color.accent) : "transparent" readonly property color hoverFill: bar ? Style.hoverFillFor(bar.foreground, Colors.accent) : "transparent"
readonly property color selectedFill: bar ? Style.selectedFillFor(bar.foreground, Color.accent) : "transparent" readonly property color selectedFill: bar ? Style.selectedFillFor(bar.foreground, Colors.accent) : "transparent"
// scannerEnabled lives on the shared WifiDevice, which has no reference // scannerEnabled lives on the shared WifiDevice, which has no reference
// counting, and a bar widget is instantiated once per monitor. Tracking the // counting, and a bar widget is instantiated once per monitor. Tracking the
@@ -1976,7 +1976,7 @@ Panel {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
height: Style.spacing.controlHeight height: Style.spacing.controlHeight
color: Style.normalFillFor(root.bar.foreground) color: Style.normalFillFor(root.bar.foreground)
borderSpec: Border.controlSpec("normal", root.bar.foreground, Color.accent) borderSpec: Border.controlSpec("normal", root.bar.foreground, Colors.accent)
radius: Style.cornerRadius radius: Style.cornerRadius
Text { Text {
+1 -1
View File
@@ -88,7 +88,7 @@ Panel {
} }
readonly property color batteryFillColor: { readonly property color batteryFillColor: {
return root.bar ? root.bar.foreground : Color.foreground return root.bar ? root.bar.foreground : Colors.foreground
} }
// Cute agent-flavored phrases shown in the hero status line, rotated on a // Cute agent-flavored phrases shown in the hero status line, rotated on a
@@ -33,7 +33,7 @@ Item {
CalendarView { CalendarView {
id: calendar id: calendar
width: parent.width width: parent.width
foreground: Color.foreground foreground: Colors.foreground
fontFamily: Style.font.family fontFamily: Style.font.family
cellSpacing: Style.space(2) cellSpacing: Style.space(2)
cellWidth: Math.floor((width - cellSpacing * 6) / 7) cellWidth: Math.floor((width - cellSpacing * 6) / 7)
@@ -52,7 +52,7 @@ Column {
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
text: "Stay Awake is on, so neither starts until it is turned off." text: "Stay Awake is on, so neither starts until it is turned off."
textFormat: Text.PlainText textFormat: Text.PlainText
color: Util.alpha(Color.foreground, 0.6) color: Util.alpha(Colors.foreground, 0.6)
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.bodySmall font.pixelSize: Style.font.bodySmall
} }
@@ -22,7 +22,7 @@ Item {
Text { Text {
text: root.clock text: root.clock
textFormat: Text.PlainText textFormat: Text.PlainText
color: Color.foreground color: Colors.foreground
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.heading font.pixelSize: Style.font.heading
font.bold: true font.bold: true
@@ -31,7 +31,7 @@ Item {
Text { Text {
text: root.today text: root.today
textFormat: Text.PlainText textFormat: Text.PlainText
color: Util.alpha(Color.foreground, 0.75) color: Util.alpha(Colors.foreground, 0.75)
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.bodySmall font.pixelSize: Style.font.bodySmall
} }
@@ -23,9 +23,9 @@ Item {
width: Style.spaceReal(48) width: Style.spaceReal(48)
height: width height: width
radius: Style.cardRadius radius: Style.cardRadius
color: Util.alpha(Color.background, Style.cardFillAlpha) color: Util.alpha(Colors.background, Style.cardFillAlpha)
border.width: Style.cardBorderWidth border.width: Style.cardBorderWidth
border.color: Util.alpha(Color.blue, Style.cardBorderAlpha) border.color: Util.alpha(Colors.blue, Style.cardBorderAlpha)
clip: true clip: true
Image { Image {
@@ -45,7 +45,7 @@ Item {
anchors.centerIn: parent anchors.centerIn: parent
visible: !root.hasArt || thumbnailImage.status !== Image.Ready visible: !root.hasArt || thumbnailImage.status !== Image.Ready
text: "" text: ""
color: Util.alpha(Color.foreground, 0.6) color: Util.alpha(Colors.foreground, 0.6)
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.title font.pixelSize: Style.font.title
} }
@@ -65,7 +65,7 @@ Item {
text: root.title text: root.title
textFormat: Text.PlainText textFormat: Text.PlainText
elide: Text.ElideRight elide: Text.ElideRight
color: Color.foreground color: Colors.foreground
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.bodySmall font.pixelSize: Style.font.bodySmall
font.bold: true font.bold: true
@@ -77,7 +77,7 @@ Item {
textFormat: Text.PlainText textFormat: Text.PlainText
elide: Text.ElideRight elide: Text.ElideRight
visible: root.artist.length > 0 visible: root.artist.length > 0
color: Util.alpha(Color.foreground, 0.75) color: Util.alpha(Colors.foreground, 0.75)
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.bodySmall font.pixelSize: Style.font.bodySmall
} }
@@ -101,7 +101,7 @@ Column {
visible: stats.loadAverage !== "" visible: stats.loadAverage !== ""
text: "Load average " + stats.loadAverage text: "Load average " + stats.loadAverage
textFormat: Text.PlainText textFormat: Text.PlainText
color: Util.alpha(Color.foreground, 0.7) color: Util.alpha(Colors.foreground, 0.7)
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.bodySmall font.pixelSize: Style.font.bodySmall
} }
@@ -32,8 +32,8 @@ Item {
readonly property int screensaverSeconds: root.timeoutSeconds(idleConfig.screensaver, 150) readonly property int screensaverSeconds: root.timeoutSeconds(idleConfig.screensaver, 150)
readonly property int lockSeconds: root.timeoutSeconds(idleConfig.lock, 300) readonly property int lockSeconds: root.timeoutSeconds(idleConfig.lock, 300)
readonly property color floatingFillColor: Util.alpha(Color.background, Style.panelFillAlpha) readonly property color floatingFillColor: Util.alpha(Colors.background, Style.panelFillAlpha)
readonly property color floatingBorderColor: Qt.tint(Color.background, Util.alpha(Color.blue, Style.cardBorderAlpha)) readonly property color floatingBorderColor: Qt.tint(Colors.background, Util.alpha(Colors.blue, Style.cardBorderAlpha))
readonly property int barInset: { readonly property int barInset: {
var bar = root.shell ? root.shell.bar : null var bar = root.shell ? root.shell.bar : null
@@ -19,7 +19,7 @@ Item {
width: Style.spaceReal(22) width: Style.spaceReal(22)
text: root.icon text: root.icon
textFormat: Text.PlainText textFormat: Text.PlainText
color: root.dimmed ? Util.alpha(Color.magenta, 0.5) : Color.magenta color: root.dimmed ? Util.alpha(Colors.magenta, 0.5) : Colors.magenta
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.body font.pixelSize: Style.font.body
@@ -37,13 +37,13 @@ Item {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
height: Style.spaceReal(8) height: Style.spaceReal(8)
radius: Style.cardRadius radius: Style.cardRadius
color: Util.alpha(Color.foreground, 0.2) color: Util.alpha(Colors.foreground, 0.2)
Rectangle { Rectangle {
width: parent.width * Math.max(0, Math.min(100, root.value)) / 100 width: parent.width * Math.max(0, Math.min(100, root.value)) / 100
height: parent.height height: parent.height
radius: Style.cardRadius radius: Style.cardRadius
color: Color.accent color: Colors.accent
} }
Rectangle { Rectangle {
@@ -52,7 +52,7 @@ Item {
width: Style.spaceReal(14) width: Style.spaceReal(14)
height: width height: width
radius: Style.cardRadius radius: Style.cardRadius
color: Color.foreground color: Colors.foreground
} }
TapHandler { TapHandler {
@@ -78,7 +78,7 @@ Item {
horizontalAlignment: Text.AlignRight horizontalAlignment: Text.AlignRight
text: root.value + "%" text: root.value + "%"
textFormat: Text.PlainText textFormat: Text.PlainText
color: Color.foreground color: Colors.foreground
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.bodySmall font.pixelSize: Style.font.bodySmall
} }
@@ -54,7 +54,7 @@ Column {
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
text: "Nothing playing" text: "Nothing playing"
textFormat: Text.PlainText textFormat: Text.PlainText
color: Util.alpha(Color.foreground, 0.6) color: Util.alpha(Colors.foreground, 0.6)
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.bodySmall font.pixelSize: Style.font.bodySmall
} }
+4 -4
View File
@@ -14,16 +14,16 @@ Rectangle {
implicitHeight: Style.spaceReal(58) implicitHeight: Style.spaceReal(58)
radius: Style.cardRadius radius: Style.cardRadius
color: root.active color: root.active
? Color.accent ? Colors.accent
: (hover.hovered ? Util.alpha(Color.blue, 0.3) : Util.alpha(Color.foreground, 0.1)) : (hover.hovered ? Util.alpha(Colors.blue, 0.3) : Util.alpha(Colors.foreground, 0.1))
border.width: 1 border.width: 1
border.color: root.active ? Color.accent : Util.alpha(Color.foreground, 0.2) border.color: root.active ? Colors.accent : Util.alpha(Colors.foreground, 0.2)
Behavior on color { Behavior on color {
ColorAnimation { duration: 150 } ColorAnimation { duration: 150 }
} }
readonly property color contentColor: root.active ? Color.background : Color.foreground readonly property color contentColor: root.active ? Colors.background : Colors.foreground
Column { Column {
anchors.centerIn: parent anchors.centerIn: parent
@@ -41,7 +41,7 @@ Item {
width: Style.spaceReal(22) width: Style.spaceReal(22)
text: root.icon text: root.icon
textFormat: Text.PlainText textFormat: Text.PlainText
color: Color.magenta color: Colors.magenta
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.body font.pixelSize: Style.font.body
} }
@@ -53,7 +53,7 @@ Item {
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: root.label text: root.label
textFormat: Text.PlainText textFormat: Text.PlainText
color: Color.foreground color: Colors.foreground
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.bodySmall font.pixelSize: Style.font.bodySmall
} }
@@ -75,7 +75,7 @@ Item {
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
text: root.formatSeconds(root.seconds) text: root.formatSeconds(root.seconds)
textFormat: Text.PlainText textFormat: Text.PlainText
color: Color.foreground color: Colors.foreground
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.bodySmall font.pixelSize: Style.font.bodySmall
} }
@@ -22,7 +22,7 @@ Card {
visible: !root.available visible: !root.available
text: "Weather unavailable" text: "Weather unavailable"
textFormat: Text.PlainText textFormat: Text.PlainText
color: Util.alpha(Color.foreground, 0.7) color: Util.alpha(Colors.foreground, 0.7)
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.bodySmall font.pixelSize: Style.font.bodySmall
} }
+2 -2
View File
@@ -53,13 +53,13 @@ Item {
anchors.topMargin: Style.spaceReal(10) anchors.topMargin: Style.spaceReal(10)
anchors.rightMargin: Style.spaceReal(10) anchors.rightMargin: Style.spaceReal(10)
implicitWidth: Style.spaceReal(400) implicitWidth: Style.spaceReal(400)
fillColor: Util.alpha(Color.background, Style.panelFillAlpha) fillColor: Util.alpha(Colors.background, Style.panelFillAlpha)
spacing: Style.spaceReal(12) spacing: Style.spaceReal(12)
Text { Text {
text: "System Monitor" text: "System Monitor"
textFormat: Text.PlainText textFormat: Text.PlainText
color: Color.foreground color: Colors.foreground
font.family: Style.font.family font.family: Style.font.family
font.pixelSize: Style.font.body font.pixelSize: Style.font.body
font.bold: true font.bold: true
+3 -3
View File
@@ -646,7 +646,7 @@ Panel {
height: Style.space(18) height: Style.space(18)
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
radius: Math.min(4, Style.cornerRadius) radius: Math.min(4, Style.cornerRadius)
color: !root.savingLocation && clearLocationArea.containsMouse ? Style.hoverFillFor(root.bar.foreground, Color.accent) : "transparent" color: !root.savingLocation && clearLocationArea.containsMouse ? Style.hoverFillFor(root.bar.foreground, Colors.accent) : "transparent"
Text { Text {
textFormat: Text.PlainText textFormat: Text.PlainText
@@ -752,7 +752,7 @@ Panel {
width: parent.width width: parent.width
height: suggestionRow.implicitHeight + Style.space(12) height: suggestionRow.implicitHeight + Style.space(12)
radius: Style.cornerRadius radius: Style.cornerRadius
color: index === root.suggestionIndex ? Style.hoverFillFor(root.bar.foreground, Color.accent) : "transparent" color: index === root.suggestionIndex ? Style.hoverFillFor(root.bar.foreground, Colors.accent) : "transparent"
Row { Row {
id: suggestionRow id: suggestionRow
@@ -764,7 +764,7 @@ Panel {
Text { Text {
textFormat: Text.PlainText textFormat: Text.PlainText
text: modelData.name text: modelData.name
color: index === root.suggestionIndex ? Style.hoverStateColor(root.bar.foreground, Color.accent) : root.bar.foreground color: index === root.suggestionIndex ? Style.hoverStateColor(root.bar.foreground, Colors.accent) : root.bar.foreground
font.family: root.bar.fontFamily font.family: root.bar.fontFamily
font.pixelSize: Style.font.body font.pixelSize: Style.font.body
} }
+12 -12
View File
@@ -11,14 +11,14 @@ Item {
id: root id: root
property string fontFamily: Style.font.menuFamily property string fontFamily: Style.font.menuFamily
// Bound to the central [polkit] section in shell.toml via Color.qml. // Bound to the central [polkit] section in shell.toml via Colors.qml.
property color accent: Color.polkit.accent property color accent: Colors.polkit.accent
property color background: Color.polkit.background property color background: Colors.polkit.background
property color foreground: Color.polkit.text property color foreground: Colors.polkit.text
property color border: Color.polkit.border property color border: Colors.polkit.border
property color borderError: Color.polkit.borderError property color borderError: Colors.polkit.borderError
property var borderSpec: Border.surfaceSpec("polkit", errorFlash ? "border-error" : "border", errorFlash ? borderError : border, Math.max(1, Style.space(2)), "border-alpha") property var borderSpec: Border.surfaceSpec("polkit", errorFlash ? "border-error" : "border", errorFlash ? borderError : border, Math.max(1, Style.space(2)), "border-alpha")
property color scrim: Color.polkit.scrim property color scrim: Colors.polkit.scrim
readonly property int cornerRadius: Style.cornerRadius readonly property int cornerRadius: Style.cornerRadius
property int contentMargin: Style.spacing.panelPadding property int contentMargin: Style.spacing.panelPadding
property int fieldHeight: Math.max(Style.space(42), Style.spacing.controlHeight) property int fieldHeight: Math.max(Style.space(42), Style.spacing.controlHeight)
@@ -278,7 +278,7 @@ Item {
text: "\udb80\ude37" text: "\udb80\ude37"
fontFamily: root.fontFamily fontFamily: root.fontFamily
fontSize: Math.round(root.fieldHeight * 0.7) fontSize: Math.round(root.fieldHeight * 0.7)
color: root.errorFlash ? Color.polkit.textError : root.accent color: root.errorFlash ? Colors.polkit.textError : root.accent
} }
Row { Row {
@@ -293,7 +293,7 @@ Item {
Text { Text {
text: "\uf023" text: "\uf023"
color: root.errorFlash ? Color.polkit.textError : root.accent color: root.errorFlash ? Colors.polkit.textError : root.accent
font.family: root.fontFamily font.family: root.fontFamily
font.pixelSize: Style.font.iconLarge font.pixelSize: Style.font.iconLarge
width: Style.space(26) width: Style.space(26)
@@ -318,7 +318,7 @@ Item {
font.pixelSize: Style.font.iconLarge font.pixelSize: Style.font.iconLarge
echoMode: root.responseVisible ? TextInput.Normal : TextInput.Password echoMode: root.responseVisible ? TextInput.Normal : TextInput.Password
passwordCharacter: "\u2022" passwordCharacter: "\u2022"
color: root.errorFlash ? Color.polkit.textError : root.foreground color: root.errorFlash ? Colors.polkit.textError : root.foreground
cursorVisible: activeFocus && !root.submitted && !root.errorFlash cursorVisible: activeFocus && !root.submitted && !root.errorFlash
readOnly: root.submitted || root.errorFlash readOnly: root.submitted || root.errorFlash
enabled: root.dialogVisible enabled: root.dialogVisible
@@ -337,7 +337,7 @@ Item {
anchors.right: parent.right anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
text: root.errorFlash ? "Wrong" : (root.submitted ? "Checking..." : "Enter password") text: root.errorFlash ? "Wrong" : (root.submitted ? "Checking..." : "Enter password")
color: root.errorFlash ? Color.polkit.textError : root.foreground color: root.errorFlash ? Colors.polkit.textError : root.foreground
opacity: root.errorFlash ? 1 : 0.36 opacity: root.errorFlash ? 1 : 0.36
font.family: root.fontFamily font.family: root.fontFamily
font.pixelSize: Style.font.iconLarge font.pixelSize: Style.font.iconLarge
@@ -350,7 +350,7 @@ Item {
height: Style.space(24) height: Style.space(24)
anchors.left: parent.left anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
color: root.errorFlash ? Color.polkit.textError : root.foreground color: root.errorFlash ? Colors.polkit.textError : root.foreground
visible: passwordInput.visible && passwordInput.activeFocus && passwordInput.text.length === 0 && !root.submitted && !root.errorFlash visible: passwordInput.visible && passwordInput.activeFocus && passwordInput.text.length === 0 && !root.submitted && !root.errorFlash
} }
+4 -4
View File
@@ -18,11 +18,11 @@ Item {
property string filterText: "" property string filterText: ""
property string fontFamily: Style.font.menuFamily property string fontFamily: Style.font.menuFamily
property color background: Color.menu.background property color background: Colors.menu.background
property color foreground: Color.menu.text property color foreground: Colors.menu.text
property color border: Color.menu.border property color border: Colors.menu.border
property var borderSpec: Border.surfaceSpec("menu", "border", border, Math.max(1, Style.space(2))) property var borderSpec: Border.surfaceSpec("menu", "border", border, Math.max(1, Style.space(2)))
property color scrim: Color.menu.scrim property color scrim: Colors.menu.scrim
readonly property int cornerRadius: Style.cornerRadius readonly property int cornerRadius: Style.cornerRadius
property int contentMargin: Style.spacing.panelPadding property int contentMargin: Style.spacing.panelPadding
property int headerHeight: Math.max(Style.space(34), Style.font.title + Style.spacing.controlPaddingY * 2) property int headerHeight: Math.max(Style.space(34), Style.font.title + Style.spacing.controlPaddingY * 2)
+4 -4
View File
@@ -123,8 +123,8 @@ BarWidget {
width: Style.space(64) width: Style.space(64)
height: Style.space(64) height: Style.space(64)
radius: Style.spacing.labelGap radius: Style.spacing.labelGap
color: Style.normalFillFor(root.bar.foreground, Color.accent) color: Style.normalFillFor(root.bar.foreground, Colors.accent)
borderSpec: Border.controlSpec("normal", root.bar.foreground, Color.accent) borderSpec: Border.controlSpec("normal", root.bar.foreground, Colors.accent)
Image { Image {
anchors.fill: parent anchors.fill: parent
@@ -247,8 +247,8 @@ BarWidget {
width: sourceList.width width: sourceList.width
height: sourceInner.implicitHeight + Style.space(10) height: sourceInner.implicitHeight + Style.space(10)
radius: Style.spacing.labelGap radius: Style.spacing.labelGap
color: selected ? Style.selectedFillFor(root.bar.foreground, Color.accent) : "transparent" color: selected ? Style.selectedFillFor(root.bar.foreground, Colors.accent) : "transparent"
borderSpec: selected ? Border.controlSpec("normal", root.bar.foreground, Color.accent) : Border.none() borderSpec: selected ? Border.controlSpec("normal", root.bar.foreground, Colors.accent) : Border.none()
Row { Row {
id: sourceInner id: sourceInner
Regular → Executable
View File
File mode changed.
+2 -2
View File
@@ -1593,8 +1593,8 @@ ShellRoot {
var shellRaw = "" var shellRaw = ""
try { colorsRaw = Qt.atob(String(colorsB64 || "")) } catch (e) { colorsRaw = "" } try { colorsRaw = Qt.atob(String(colorsB64 || "")) } catch (e) { colorsRaw = "" }
try { shellRaw = Qt.atob(String(shellB64 || "")) } catch (e2) { shellRaw = "" } try { shellRaw = Qt.atob(String(shellB64 || "")) } catch (e2) { shellRaw = "" }
Color.loadColors(colorsRaw) Colors.loadColors(colorsRaw)
Color.loadShell(shellRaw) Colors.loadShell(shellRaw)
Style.scheduleRefresh() Style.scheduleRefresh()
return "ok" return "ok"
} }