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

+6 -6
View File
@@ -22,7 +22,7 @@ QtObject {
}
function value(section, key) {
var v = Color.shellValues[section + "." + key]
var v = Colors.shellValues[section + "." + key]
return (v === undefined || v === null) ? "" : v
}
@@ -39,7 +39,7 @@ QtObject {
var seen = {}
while (s.match(/^[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$/) && !seen[s]) {
seen[s] = true
var next = Color.shellValues[s]
var next = Colors.shellValues[s]
if (next === undefined || next === null || String(next).length === 0) break
s = String(next).replace(/^\s+|\s+$/g, "")
}
@@ -68,10 +68,10 @@ QtObject {
var s = String(color || "").replace(/^\s+|\s+$/g, "")
var role = s.toLowerCase()
if (role === "foreground" || role === "text") return cssColor(Color.foreground, a)
if (role === "accent") return cssColor(Color.accent, a)
if (role === "urgent") return cssColor(Color.urgent, a)
if (role === "background") return cssColor(Color.background, a)
if (role === "foreground" || role === "text") return cssColor(Colors.foreground, a)
if (role === "accent") return cssColor(Colors.accent, a)
if (role === "urgent") return cssColor(Colors.urgent, a)
if (role === "background") return cssColor(Colors.background, a)
if (role === "transparent") return "transparent"
return Geometry.canonicalColor(s, a)
}
@@ -186,7 +186,7 @@ QtObject {
property var themeShellValues: ({})
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.
// Accepts quoted strings, bare numeric values, bare width lists, and bare
// 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.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
// rounding, gap to screen edges, state affordances, spacing, typography
// scale, and bar dimensions.
@@ -113,27 +113,27 @@ QtObject {
}
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 role = s.toLowerCase()
if (role === "foreground" || role === "text") return foreground || Color.foreground
if (role === "accent") return accent || Color.accent
if (role === "urgent") return urgent || Color.urgent
if (role === "background") return Color.background
if (role === "foreground" || role === "text") return foreground || Colors.foreground
if (role === "accent") return accent || Colors.accent
if (role === "urgent") return urgent || Colors.urgent
if (role === "background") return Colors.background
if (role === "transparent") return Qt.rgba(0, 0, 0, 0)
return colorFromHex(s, fb)
}
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) {
return resolveStateColor(hoverColorToken, foreground, accent, urgent, foreground || Color.foreground)
return resolveStateColor(hoverColorToken, foreground, accent, urgent, foreground || Colors.foreground)
}
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) {
@@ -148,7 +148,7 @@ QtObject {
}
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) }
@@ -186,17 +186,17 @@ QtObject {
}
// Convenience colors resolved against the foundational palette.
readonly property color normalFill: normalFillFor(Color.foreground, Color.accent, Color.urgent)
readonly property color hoverFill: hoverFillFor(Color.foreground, Color.accent, Color.urgent)
readonly property color selectedFill: selectedFillFor(Color.foreground, Color.accent, Color.urgent)
readonly property color pressedFill: pressedFillFor(Color.foreground, Color.accent, Color.urgent)
readonly property color focusFillColor: focusFillFor(Color.foreground, Color.accent, Color.urgent)
readonly property color normalBorderColor: normalBorderFor(Color.foreground, Color.accent, Color.urgent)
readonly property color hoverBorderColor: hoverBorderFor(Color.foreground, Color.accent, Color.urgent)
readonly property color selectedBorderColor: selectedBorderFor(Color.foreground, Color.accent, Color.urgent)
readonly property color focusBorderColor: focusBorderFor(Color.foreground, Color.accent, Color.urgent)
readonly property color selectedAccentFill: Util.alpha(Color.accent, selectedFillAlpha)
readonly property color selectionFill: selectionFillFor(Color.foreground, Color.accent, Color.urgent)
readonly property color normalFill: normalFillFor(Colors.foreground, Colors.accent, Colors.urgent)
readonly property color hoverFill: hoverFillFor(Colors.foreground, Colors.accent, Colors.urgent)
readonly property color selectedFill: selectedFillFor(Colors.foreground, Colors.accent, Colors.urgent)
readonly property color pressedFill: pressedFillFor(Colors.foreground, Colors.accent, Colors.urgent)
readonly property color focusFillColor: focusFillFor(Colors.foreground, Colors.accent, Colors.urgent)
readonly property color normalBorderColor: normalBorderFor(Colors.foreground, Colors.accent, Colors.urgent)
readonly property color hoverBorderColor: hoverBorderFor(Colors.foreground, Colors.accent, Colors.urgent)
readonly property color selectedBorderColor: selectedBorderFor(Colors.foreground, Colors.accent, Colors.urgent)
readonly property color focusBorderColor: focusBorderFor(Colors.foreground, Colors.accent, Colors.urgent)
readonly property color selectedAccentFill: Util.alpha(Colors.accent, selectedFillAlpha)
readonly property color selectionFill: selectionFillFor(Colors.foreground, Colors.accent, Colors.urgent)
// ---------------------------------------------------------- spacing
//
@@ -379,7 +379,7 @@ QtObject {
}
// 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.
function applyShellValues(values) {
var fontOut = {}
+1 -1
View File
@@ -3,7 +3,7 @@ import Quickshell
import QtQuick
// 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 {
id: root
+1 -1
View File
@@ -1,5 +1,5 @@
module qs.Commons
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 Util 1.0 Util.qml
+6 -6
View File
@@ -32,9 +32,9 @@ BorderSurface {
property bool bordered: false
// 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 accent: Color.accent
property color accent: Colors.accent
// Sizing.
property string fontFamily: Style.font.family
@@ -54,9 +54,9 @@ BorderSurface {
// Tooltip palette. Auto-rendered if tooltipText is set. Defaults pull
// from [tooltip] in shell.toml; override per-instance only when a button
// intentionally wants a tooltip that diverges from the theme.
property color tooltipBackground: Color.tooltip.background
property color tooltipForeground: Color.tooltip.text
property color tooltipBorder: Color.tooltip.border
property color tooltipBackground: Colors.tooltip.background
property color tooltipForeground: Colors.tooltip.text
property color tooltipBorder: Colors.tooltip.border
signal clicked()
signal rightClicked()
@@ -77,7 +77,7 @@ BorderSurface {
readonly property bool hot: mouseArea.containsMouse || hasCursor
readonly property bool _showFocusRing: focusable && activeFocus
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 _hoverBorderSpec: Border.controlSpec("hover-cursor", 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 string value: ""
property color foreground: Color.foreground
property color background: Color.background
property color accent: Color.accent
property color foreground: Colors.foreground
property color background: Colors.background
property color accent: Colors.accent
property string fontFamily: Style.font.family
property real fontSize: Style.font.body
property bool focusable: true
+7 -7
View File
@@ -29,13 +29,13 @@ Item {
width: root.calendar.weekColumnWidth
height: root.headerHeight
radius: Style.cornerRadius
color: weekHeaderMouse.containsMouse ? Style.hoverFillFor(root.foreground, Color.accent) : "transparent"
color: weekHeaderMouse.containsMouse ? Style.hoverFillFor(root.foreground, Colors.accent) : "transparent"
Text {
anchors.centerIn: parent
text: "W"
color: weekHeaderMouse.containsMouse
? Style.hoverStateColor(root.foreground, Color.accent)
? Style.hoverStateColor(root.foreground, Colors.accent)
: Qt.darker(root.foreground, 1.9)
font.family: root.calendar.fontFamily
font.pixelSize: Style.font.caption
@@ -135,9 +135,9 @@ Item {
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: {
if (modelData.today) return Color.background
if (modelData.today) return Colors.background
if (!modelData.inMonth) return root.foreground
return modelData.weekend ? Qt.darker(root.foreground, 1.45) : root.foreground
}
@@ -147,12 +147,12 @@ Item {
radius: Style.cornerRadius
color: {
if (modelData.today) return todayFill
if (dayMouse.containsMouse) return Style.hoverFillFor(root.foreground, Color.accent)
if (modelData.selected) return Style.selectedFillFor(root.foreground, Color.accent)
if (dayMouse.containsMouse) return Style.hoverFillFor(root.foreground, Colors.accent)
if (modelData.selected) return Style.selectedFillFor(root.foreground, Colors.accent)
return "transparent"
}
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 {
anchors.centerIn: parent
+4 -4
View File
@@ -34,18 +34,18 @@ Item {
height: (root.height - root.gap * (root.rows - 1)) / root.rows
radius: Style.cornerRadius
color: {
if (isCurrentMonth) return Style.selectedStateColor(root.foreground, Color.accent)
if (isCursor) return Style.hoverFillFor(root.foreground, Color.accent)
if (isCurrentMonth) return Style.selectedStateColor(root.foreground, Colors.accent)
if (isCursor) return Style.hoverFillFor(root.foreground, Colors.accent)
return "transparent"
}
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 {
anchors.centerIn: parent
textFormat: Text.PlainText
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.pixelSize: Style.font.body
font.letterSpacing: 1
+3 -3
View File
@@ -7,7 +7,7 @@ Column {
property date today: new Date()
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 bool showWeekNumbers: false
property bool navigationAtBottom: false
@@ -191,7 +191,7 @@ Column {
width: navigationLabel.width
height: navigationLabel.implicitHeight + Style.space(6)
radius: Style.cornerRadius
color: navigationMouse.containsMouse ? Style.hoverFillFor(root.foreground, Color.accent) : "transparent"
color: navigationMouse.containsMouse ? Style.hoverFillFor(root.foreground, Colors.accent) : "transparent"
}
Text {
@@ -204,7 +204,7 @@ Column {
? String(root.pickerYear)
: Qt.formatDate(root.viewDate, "MMMM yyyy").toUpperCase()
color: navigationMouse.containsMouse
? Style.hoverStateColor(root.foreground, Color.accent)
? Style.hoverStateColor(root.foreground, Colors.accent)
: Qt.darker(root.foreground, 1.4)
font.family: root.fontFamily
font.pixelSize: Style.font.body
+2 -2
View File
@@ -4,8 +4,8 @@ import qs.Commons
Rectangle {
id: root
property color fillColor: Util.alpha(Color.background, Style.cardFillAlpha)
property color borderColor: Util.alpha(Color.blue, Style.cardBorderAlpha)
property color fillColor: Util.alpha(Colors.background, Style.cardFillAlpha)
property color borderColor: Util.alpha(Colors.blue, Style.cardBorderAlpha)
default property alias content: contentColumn.data
property alias spacing: contentColumn.spacing
property int padding: Style.cardPadding
+3 -3
View File
@@ -13,14 +13,14 @@ Row {
width: Style.spaceReal(28)
height: width
radius: Style.cardRadius
color: Util.alpha(Color.blue, 0.2)
color: Util.alpha(Colors.blue, 0.2)
anchors.verticalCenter: parent.verticalCenter
Text {
anchors.centerIn: parent
text: root.icon
textFormat: Text.PlainText
color: Color.blue
color: Colors.blue
font.family: Style.font.family
font.pixelSize: Style.font.body
}
@@ -30,7 +30,7 @@ Row {
anchors.verticalCenter: parent.verticalCenter
text: root.title
textFormat: Text.PlainText
color: Color.foreground
color: Colors.foreground
font.family: Style.font.family
font.pixelSize: Style.font.body
font.bold: true
+3 -3
View File
@@ -12,14 +12,14 @@ Rectangle {
implicitHeight: Style.spaceReal(24)
radius: Style.cardRadius
color: root.active
? Color.accent
: (hover.hovered ? Util.alpha(Color.blue, 0.3) : Util.alpha(Color.foreground, 0.1))
? Colors.accent
: (hover.hovered ? Util.alpha(Colors.blue, 0.3) : Util.alpha(Colors.foreground, 0.1))
Text {
anchors.centerIn: parent
text: root.icon
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.pixelSize: Style.font.bodySmall
}
+4 -4
View File
@@ -13,17 +13,17 @@ Rectangle {
radius: Style.cardRadius
opacity: enabled ? 1 : 0.4
color: root.active
? Color.accent
: (hover.hovered ? Util.alpha(Color.blue, 0.25) : Util.alpha(Color.background, Style.cardFillAlpha))
? Colors.accent
: (hover.hovered ? Util.alpha(Colors.blue, 0.25) : Util.alpha(Colors.background, Style.cardFillAlpha))
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 {
id: text
anchors.centerIn: parent
text: root.label
textFormat: Text.PlainText
color: root.active ? Color.background : Color.foreground
color: root.active ? Colors.background : Colors.foreground
font.family: Style.font.family
font.pixelSize: Style.font.bodySmall
}
+8 -8
View File
@@ -9,11 +9,11 @@ Item {
property string cancelText: "Cancel"
property string confirmText: "Confirm"
property int selectedIndex: 1
property color background: Color.background
property color foreground: Color.foreground
property color scrim: Util.alpha(Color.background, 0.7)
property color selectedBackground: Util.alpha(Color.foreground, 0.08)
property color selectedText: Color.accent
property color background: Colors.background
property color foreground: Colors.foreground
property color scrim: Util.alpha(Colors.background, 0.7)
property color selectedBackground: Util.alpha(Colors.foreground, 0.08)
property color selectedText: Colors.accent
property string fontFamily: Style.font.family
property int cornerRadius: Style.cornerRadius
@@ -98,10 +98,10 @@ Item {
width: Style.space(88)
height: Style.space(34)
color: selected
? (destructive ? Util.alpha(Color.urgent, 0.22) : root.selectedBackground)
? (destructive ? Util.alpha(Colors.urgent, 0.22) : root.selectedBackground)
: "transparent"
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)
radius: 0
@@ -109,7 +109,7 @@ Item {
textFormat: Text.PlainText
anchors.centerIn: parent
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.pixelSize: Style.font.caption
}
+2 -2
View File
@@ -19,8 +19,8 @@ BorderSurface {
property bool outline: false
property bool bordered: false
property color foreground: Color.foreground
property color accent: Color.accent
property color foreground: Colors.foreground
property color accent: Colors.accent
property color fill: Style.hoverFillFor(foreground, accent)
property color currentFill: Style.selectedFillFor(foreground, accent)
+7 -7
View File
@@ -3,8 +3,8 @@ import QtQuick.Controls
import qs.Commons
// Themed single-select dropdown. Trigger row paints with the kit's focus
// chrome; the popup anchors below and uses Color.popups.background +
// Color.popups.border so it reads as a panel surface rather than the
// chrome; the popup anchors below and uses Colors.popups.background +
// Colors.popups.border so it reads as a panel surface rather than the
// platform-native ComboBox look.
//
// `options` accepts either a plain string[] or an array of
@@ -22,11 +22,11 @@ Item {
property string value: ""
property var options: []
property color foreground: Color.popups.text
property color background: Color.popups.background
property color popupBorder: Color.popups.border
property color accent: Color.accent
readonly property var popupBorderSpec: Border.localOrSurfaceSpec("popups", "border", popupBorder, Color.popups.border, Style.normalBorderWidth)
property color foreground: Colors.popups.text
property color background: Colors.popups.background
property color popupBorder: Colors.popups.border
property color accent: Colors.accent
readonly property var popupBorderSpec: Border.localOrSurfaceSpec("popups", "border", popupBorder, Colors.popups.border, Style.normalBorderWidth)
property string fontFamily: Style.font.family
property int rowHeight: Style.spacing.controlHeight
property int popupRowHeight: Style.spacing.popupRowHeight
+2 -2
View File
@@ -44,7 +44,7 @@ PanelWindow {
property int padding: Style.spacing.popupPadding
property int contentWidth: Style.space(280)
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 open: false
property int gap: Style.gapsOut // distance between bar edge and panel
@@ -382,7 +382,7 @@ PanelWindow {
y: root.cardOrigin.y
width: root.contentWidth
height: root.contentHeight
color: Color.popups.background
color: Colors.popups.background
borderSpec: root.borderSpec
padding: root.padding
radius: Style.cornerRadius
+5 -5
View File
@@ -22,7 +22,7 @@ Column {
width: Style.spaceReal(22)
text: root.icon
textFormat: Text.PlainText
color: Color.magenta
color: Colors.magenta
font.family: Style.font.family
font.pixelSize: Style.font.body
}
@@ -34,7 +34,7 @@ Column {
anchors.verticalCenter: parent.verticalCenter
text: root.name
textFormat: Text.PlainText
color: Color.foreground
color: Colors.foreground
font.family: Style.font.family
font.pixelSize: Style.font.bodySmall
font.bold: true
@@ -45,7 +45,7 @@ Column {
anchors.verticalCenter: parent.verticalCenter
text: root.detail
textFormat: Text.PlainText
color: Util.alpha(Color.foreground, 0.8)
color: Util.alpha(Colors.foreground, 0.8)
font.family: Style.font.family
font.pixelSize: Style.font.bodySmall
}
@@ -55,13 +55,13 @@ Column {
width: parent.width
height: Style.spaceReal(8)
radius: Style.cardRadius
color: Util.alpha(Color.foreground, 0.2)
color: Util.alpha(Colors.foreground, 0.2)
Rectangle {
width: parent.width * Math.max(0, Math.min(100, root.percent)) / 100
height: parent.height
radius: Style.cardRadius
color: Color.accent
color: Colors.accent
Behavior on width {
NumberAnimation { duration: 200 }
+5 -5
View File
@@ -33,11 +33,11 @@ Item {
property string triggerLabel: ""
property bool showLabel: true
property color foreground: Color.popups.text
property color background: Color.popups.background
property color popupBorder: Color.popups.border
property color accent: Color.accent
readonly property var popupBorderSpec: Border.localOrSurfaceSpec("popups", "border", popupBorder, Color.popups.border, Style.normalBorderWidth)
property color foreground: Colors.popups.text
property color background: Colors.popups.background
property color popupBorder: Colors.popups.border
property color accent: Colors.accent
readonly property var popupBorderSpec: Border.localOrSurfaceSpec("popups", "border", popupBorder, Colors.popups.border, Style.normalBorderWidth)
property string fontFamily: Style.font.family
property int rowHeight: Style.spacing.controlHeight
property int popupRowHeight: Style.spacing.popupRowHeight
+2 -2
View File
@@ -10,8 +10,8 @@ Column {
property int from: 0
property int to: 100
property int stepSize: 1
property color foreground: Color.foreground
property color accent: Color.accent
property color foreground: Colors.foreground
property color accent: Colors.accent
property string fontFamily: Style.font.family
property real fontSize: Style.font.body
property real fieldWidth: Style.spacing.numberFieldWidth
+1 -1
View File
@@ -7,7 +7,7 @@ Item {
property string text: ""
property string fontFamily: Style.font.family
property real fontSize: Style.font.body
property color color: Color.foreground
property color color: Colors.foreground
property bool debugBounds: false
readonly property int renderedFontSize: Math.max(1, Math.round(fontSize))
+1 -1
View File
@@ -19,7 +19,7 @@ Item {
property bool popoutSwitchClosing: false
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 close() { panelController.hide() }
+2 -2
View File
@@ -29,7 +29,7 @@ BorderSurface {
property string iconText: ""
property string tooltipText: ""
property color foreground: Color.foreground
property color foreground: Colors.foreground
property color hoverColor: foreground
property string fontFamily: Style.font.family
property real fontSize: Style.font.icon
@@ -57,7 +57,7 @@ BorderSurface {
? Border.controlSpec("focus", hoverColor, hoverColor)
: (_hot && bordered
? 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
? Style.focusFillFor(hoverColor, hoverColor)
+2 -2
View File
@@ -8,7 +8,7 @@ Item {
property string title: ""
property string meta: ""
property string detail: ""
property color foreground: Color.foreground
property color foreground: Colors.foreground
property string fontFamily: Style.font.family
property real iconSize: Style.font.display
property real iconOpacity: 1.0
@@ -71,7 +71,7 @@ Item {
implicitHeight: detailText.implicitHeight + Style.space(4)
anchors.verticalCenter: parent.verticalCenter
color: "transparent"
borderSpec: Border.controlSpec("normal", root.foreground, Color.accent)
borderSpec: Border.controlSpec("normal", root.foreground, Colors.accent)
radius: Style.cornerRadius
Text {
+1 -1
View File
@@ -7,7 +7,7 @@ import qs.Commons
Text {
id: root
property color foreground: Color.foreground
property color foreground: Colors.foreground
property string fontFamily: Style.font.family
property real fontSize: Style.font.caption
+1 -1
View File
@@ -7,7 +7,7 @@ import qs.Commons
Rectangle {
id: root
property color foreground: Color.foreground
property color foreground: Colors.foreground
property real strength: 0.12
width: parent ? parent.width : implicitWidth
+4 -4
View File
@@ -10,9 +10,9 @@ Item {
property real maximum: 1
property real step: 0.05
property bool integer: false
property color trackColor: bar ? Style.selectedFillFor(bar.foreground, Color.accent) : "#333"
property color fillColor: bar ? bar.foreground : Color.foreground
property color knobColor: bar ? bar.foreground : Color.foreground
property color trackColor: bar ? Style.selectedFillFor(bar.foreground, Colors.accent) : "#333"
property color fillColor: bar ? bar.foreground : Colors.foreground
property color knobColor: bar ? bar.foreground : Colors.foreground
property bool dragging: false
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))
@@ -23,7 +23,7 @@ Item {
// 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.
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
+5 -5
View File
@@ -9,7 +9,7 @@ import qs.Commons
// 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
// intentionally diverges from the theme.
//
@@ -18,13 +18,13 @@ import qs.Commons
ToolTip {
id: root
property color panelForeground: Color.tooltip.text
property color panelBackground: Color.tooltip.background
property color panelBorder: Color.tooltip.border
property color panelForeground: Colors.tooltip.text
property color panelBackground: Colors.tooltip.background
property color panelBorder: Colors.tooltip.border
property string fontFamily: Style.font.family
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
padding: 0
+3 -3
View File
@@ -13,8 +13,8 @@ PopupWindow {
property int padding: Style.spacing.popupPadding
property int contentWidth: Style.space(280)
property int contentHeight: Style.space(200)
property color borderColor: Color.popups.border
property var borderSpec: Border.localOrSurfaceSpec("popups", "border", borderColor, Color.popups.border, Math.max(1, Style.space(2)))
property color borderColor: Colors.popups.border
property var borderSpec: Border.localOrSurfaceSpec("popups", "border", borderColor, Colors.popups.border, Math.max(1, Style.space(2)))
property bool open: false
property bool centerOnBar: false
// "click" — uses HyprlandFocusGrab so clicking outside dismisses the popup.
@@ -150,7 +150,7 @@ PopupWindow {
BorderSurface {
id: card
anchors.fill: parent
color: Color.popups.background
color: Colors.popups.background
borderSpec: root.borderSpec
padding: root.padding
radius: Style.cornerRadius
+5 -5
View File
@@ -25,11 +25,11 @@ Item {
property string emptyText: "No matches"
property string triggerLabel: ""
property color foreground: Color.popups.text
property color background: Color.popups.background
property color popupBorder: Color.popups.border
property color accent: Color.accent
readonly property var popupBorderSpec: Border.localOrSurfaceSpec("popups", "border", popupBorder, Color.popups.border, Style.normalBorderWidth)
property color foreground: Colors.popups.text
property color background: Colors.popups.background
property color popupBorder: Colors.popups.border
property color accent: Colors.accent
readonly property var popupBorderSpec: Border.localOrSurfaceSpec("popups", "border", popupBorder, Colors.popups.border, Style.normalBorderWidth)
property string fontFamily: Style.font.family
property int rowHeight: Style.spacing.controlHeight
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.
ShapePath {
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"
capStyle: ShapePath.RoundCap
@@ -305,7 +305,7 @@ PanelWindow {
// Value: fills behind the needle.
ShapePath {
strokeWidth: dial.arcWidth
strokeColor: dial.arcVisible ? Color.accent : "transparent"
strokeColor: dial.arcVisible ? Colors.accent : "transparent"
fillColor: "transparent"
capStyle: ShapePath.RoundCap
@@ -356,8 +356,8 @@ PanelWindow {
radius: width / 2
gradient: Gradient {
GradientStop { position: 0.0; color: Color.accent }
GradientStop { position: 0.55; color: Color.accent }
GradientStop { position: 0.0; color: Colors.accent }
GradientStop { position: 0.55; color: Colors.accent }
GradientStop { position: 1.0; color: "transparent" }
}
}
+3 -3
View File
@@ -17,7 +17,7 @@ Item {
width: Style.spaceReal(22)
text: root.icon
textFormat: Text.PlainText
color: Color.magenta
color: Colors.magenta
font.family: Style.font.family
font.pixelSize: Style.font.body
}
@@ -29,7 +29,7 @@ Item {
anchors.verticalCenter: parent.verticalCenter
text: root.label
textFormat: Text.PlainText
color: Color.foreground
color: Colors.foreground
font.family: Style.font.family
font.pixelSize: Style.font.bodySmall
}
@@ -43,7 +43,7 @@ Item {
elide: Text.ElideRight
text: root.value
textFormat: Text.PlainText
color: Color.foreground
color: Colors.foreground
font.family: Style.font.family
font.pixelSize: Style.font.bodySmall
font.bold: true
+2 -2
View File
@@ -18,8 +18,8 @@ import qs.Commons
TextField {
id: root
property color foreground: Color.foreground
property color accent: Color.accent
property color foreground: Colors.foreground
property color accent: Colors.accent
property color selectionTint: Style.selectionFillFor(foreground, accent)
property bool password: false
property real horizontalPadding: Style.spacing.controlPaddingX
+2 -2
View File
@@ -28,8 +28,8 @@ BorderSurface {
// Override per-instance if a caller wants the opposite.
property bool rounded: Style.cornerRadius > 0
property color foreground: Color.foreground
property color accent: Color.accent
property color foreground: Colors.foreground
property color accent: Colors.accent
property string fontFamily: Style.font.family
property real titleSize: Style.font.subtitle
property real descriptionSize: Style.font.caption
+2 -2
View File
@@ -40,8 +40,8 @@ Item {
property bool cursorRing: interactive
property int cursorPad: Style.space(6)
property bool rounded: Style.cornerRadius > 0
property color foreground: Color.foreground
property color accent: Color.accent
property color foreground: Colors.foreground
property color accent: Colors.accent
signal toggled()
signal hovered(bool isHovered)
+2 -2
View File
@@ -8,8 +8,8 @@ Item {
property string text: ""
property string fontFamily: bar ? bar.fontFamily : Style.font.family
property real fontSize: Style.font.body
property color foreground: bar ? bar.barForeground : Color.foreground
property color activeColor: bar ? bar.urgent : Color.urgent
property color foreground: bar ? bar.barForeground : Colors.foreground
property color activeColor: bar ? bar.urgent : Colors.urgent
property bool active: false
property real horizontalMargin: 8.5
property real verticalPadding: 6
+6 -6
View File
@@ -10,10 +10,10 @@ Panel {
ipcTarget: "blob.agents"
manageIpc: false
readonly property color foreground: bar ? bar.foreground : Color.foreground
readonly property color urgent: Color.urgent
readonly property color foreground: bar ? bar.foreground : Colors.foreground
readonly property color urgent: Colors.urgent
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 barGlyph: "󱚣"
readonly property string launchCommand: "blob-launch-terminal claude"
@@ -253,15 +253,15 @@ Panel {
implicitWidth: Style.space(34)
implicitHeight: implicitWidth
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.color: Color.accent
border.color: Colors.accent
Text {
anchors.centerIn: parent
textFormat: Text.PlainText
text: heroButton.glyph
color: Color.accent
color: Colors.accent
font.family: root.fontFamily
font.pixelSize: Style.font.heading
}
+3 -3
View File
@@ -104,10 +104,10 @@ Item {
// pending; the latest theme payload should still apply.
if (pendingThemeVersion < 0) return
pendingThemeFallbackTimer.stop()
Color.loadColors(pendingColorsRaw)
// Color.loadShell also refreshes Style so the type scale flips with the
Colors.loadColors(pendingColorsRaw)
// Colors.loadShell also refreshes Style so the type scale flips with the
// background reveal instead of waiting for a separate reload path.
Color.loadShell(pendingShellRaw)
Colors.loadShell(pendingShellRaw)
Style.scheduleRefresh()
pendingThemeVersion = -1
pendingColorsRaw = ""
+11 -11
View File
@@ -68,16 +68,16 @@ Item {
// to "monospace"), so changing the system font (via `blob-font-set`)
// updates the bar without a reload.
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.
property color themeForeground: Color.bar.text
property color themeContrastForeground: Color.background
property color transparentForeground: Color.bar.text
property color themeForeground: Colors.bar.text
property color themeContrastForeground: Colors.background
property color transparentForeground: Colors.bar.text
property color foreground: themeForeground
property color barForeground: useTransparentForeground ? transparentForeground : themeForeground
property bool foregroundAnimationEnabled: true
property color background: Color.bar.background
property color urgent: Color.bar.active
property color background: Colors.bar.background
property color urgent: Colors.bar.active
Behavior on barForeground { enabled: root.foregroundAnimationEnabled; ColorAnimation { duration: 420; easing.type: Easing.InOutCubic } }
Behavior on background { ColorAnimation { duration: 420; easing.type: Easing.InOutCubic } }
@@ -1249,8 +1249,8 @@ Item {
id: tooltipBubble
implicitWidth: tooltipLabel.implicitWidth + 20
implicitHeight: tooltipLabel.implicitHeight + 14
color: Color.tooltip.background
borderSpec: Border.surfaceSpec("tooltip", "border", Color.tooltip.border, 1)
color: Colors.tooltip.background
borderSpec: Border.surfaceSpec("tooltip", "border", Colors.tooltip.border, 1)
radius: Style.cornerRadius
Text {
@@ -1258,7 +1258,7 @@ Item {
textFormat: Text.PlainText
anchors.centerIn: parent
text: root.tooltipText
color: Color.tooltip.text
color: Colors.tooltip.text
font.family: root.fontFamily
font.pixelSize: Style.font.body
horizontalAlignment: Text.AlignHCenter
@@ -1377,7 +1377,7 @@ Item {
y: targetRect ? Math.round(targetRect.y) : 0
width: targetRect ? targetRect.width : 0
height: targetRect ? targetRect.height : 0
color: Color.accent
color: Colors.accent
radius: Math.min(width, height) / 2
}
}
@@ -1673,7 +1673,7 @@ Item {
visible: opacity > 0
opacity: slot.panelOpen && !slot.dragSource ? 0.9 : 0
color: Color.accent
color: Colors.accent
radius: Math.min(width, height) / 2
width: root.vertical ? Style.space(2) : slot.panelIndicatorExtent
height: root.vertical ? slot.panelIndicatorExtent : Style.space(2)
+1 -1
View File
@@ -34,7 +34,7 @@ BarWidget {
anchors.left: parent.left
width: parent.width
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.pixelSize: Style.font.body
elide: Text.ElideRight
+3 -3
View File
@@ -16,7 +16,7 @@ BarWidget {
property bool trayMenuOpen: false
property var activeTrayItem: 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 var pinnedIds: settings.pinned instanceof Array ? settings.pinned : []
readonly property var hiddenIds: settings.hidden instanceof Array ? settings.hidden : []
@@ -617,7 +617,7 @@ BarWidget {
anchors.rightMargin: Style.space(10)
anchors.verticalCenter: parent.verticalCenter
height: 1
color: Color.popups.border
color: Colors.popups.border
opacity: 0.45
}
}
@@ -671,7 +671,7 @@ BarWidget {
anchors.rightMargin: Style.space(10)
anchors.verticalCenter: parent.verticalCenter
height: 1
color: Color.popups.border
color: Colors.popups.border
opacity: 0.45
}
+6 -6
View File
@@ -22,13 +22,13 @@ Item {
// Shares the [menu] surface tokens — themes that style the menu also
// style the clipboard. Selected-row colors composed in the
// singleton so consumers drop them straight into Rectangle bindings.
property color background: Color.menu.background
property color foreground: Color.menu.text
property color border: Color.menu.border
property color background: Colors.menu.background
property color foreground: Colors.menu.text
property color border: Colors.menu.border
property var borderSpec: Border.surfaceSpec("menu", "border", border, Math.max(1, Style.space(2)))
property color scrim: Color.menu.scrim
property color selectedBackground: Color.menu.selectedBackground
property color selectedText: Color.menu.selectedText
property color scrim: Colors.menu.scrim
property color selectedBackground: Colors.menu.selectedBackground
property color selectedText: Colors.menu.selectedText
readonly property int cornerRadius: Style.cornerRadius
property string fontFamily: Style.font.menuFamily
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
// style emojis. Selected-cell colors composed in the
// singleton so consumers drop them straight into Rectangle bindings.
property color background: Color.menu.background
property color foreground: Color.menu.text
property color border: Color.menu.border
property color background: Colors.menu.background
property color foreground: Colors.menu.text
property color border: Colors.menu.border
property var borderSpec: Border.surfaceSpec("menu", "border", border, Math.max(1, Style.space(2)))
property color scrim: Color.menu.scrim
property color selectedBackground: Color.menu.selectedBackground
property color selectedText: Color.menu.selectedText
property color scrim: Colors.menu.scrim
property color selectedBackground: Colors.menu.selectedBackground
property color selectedText: Colors.menu.selectedText
readonly property int cornerRadius: Style.cornerRadius
property string fontFamily: Style.font.menuFamily
property int contentMargin: Style.spacing.panelPadding
+6 -6
View File
@@ -30,14 +30,14 @@ Item {
property string doneFile: ""
property string filterText: ""
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;
// it intentionally tracks the foundational background, not a surface role.
property color dimColor: Color.background
property color foreground: Color.imagePicker.text
property color scrim: Color.imagePicker.scrim
property color selectedBorder: Color.imagePicker.selectedBorder
property color unselectedBorder: Color.imagePicker.unselectedBorder
property color dimColor: Colors.background
property color foreground: Colors.imagePicker.text
property color scrim: Colors.imagePicker.scrim
property color selectedBorder: Colors.imagePicker.selectedBorder
property color unselectedBorder: Colors.imagePicker.unselectedBorder
property int expandedWidth: 768
property int expandedHeight: 475
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 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
? Color.urgent
: (inputActive ? Color.accent : Util.alpha(root.inputRestingBorder, 0.5))
readonly property color inputBackground: Util.alpha(Color.background, 0.6)
? Colors.urgent
: (inputActive ? Colors.accent : Util.alpha(root.inputRestingBorder, 0.5))
readonly property color inputBackground: Util.alpha(Colors.background, 0.6)
readonly property var inputBorderSpec: Border.flat(root.inputBorderColor, root.outlineThickness)
signal submitPassword(string password)
@@ -107,7 +107,7 @@ Item {
Rectangle {
anchors.fill: parent
color: Color.background
color: Colors.background
Image {
id: wallpaper
@@ -148,7 +148,7 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter
text: Qt.formatDateTime(clock.date, "HH:mm")
textFormat: Text.PlainText
color: Color.lock.text
color: Colors.lock.text
font.family: Style.font.family
font.pixelSize: root.clockFontSize
}
@@ -157,7 +157,7 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter
text: Qt.formatDateTime(clock.date, "dddd, d MMMM")
textFormat: Text.PlainText
color: Color.lock.placeholder
color: Colors.lock.placeholder
font.family: Style.font.family
font.pixelSize: root.dateFontSize
}
@@ -173,7 +173,7 @@ Item {
visible: root.brandingText.length > 0 && height > 0
text: root.brandingText
textFormat: Text.PlainText
color: Color.lock.text
color: Colors.lock.text
font.family: Style.font.family
font.pixelSize: root.brandingMaxFontSize
minimumPixelSize: 4
@@ -210,16 +210,16 @@ Item {
echoMode: TextInput.Password
passwordCharacter: "\u25CF"
passwordMaskDelay: 0
color: Color.lock.text
selectionColor: Color.lock.selection
selectedTextColor: Color.lock.text
color: Colors.lock.text
selectionColor: Colors.lock.selection
selectedTextColor: Colors.lock.text
font.family: Style.font.family
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
cursorVisible: activeFocus && root.showPasswordCursor && text.length > 0
cursorDelegate: Rectangle {
width: 2
color: Color.lock.text
color: Colors.lock.text
visible: passwordInput.cursorVisible
}
@@ -251,7 +251,7 @@ Item {
anchors.fill: passwordInput
text: root.authenticatingPassword ? "Checking…" : (root.failureMessage.length > 0 ? root.failureMessage : root.placeholderText)
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.pixelSize: root.fieldFontSize
font.italic: !root.authenticatingPassword && root.failureMessage.length > 0
@@ -271,7 +271,7 @@ Item {
anchors.verticalCenter: parent.verticalCenter
visible: root.fingerprintConfigured
text: "󰈷"
color: Color.lock.placeholder
color: Colors.lock.placeholder
font.family: Style.font.family
font.pixelSize: Math.round(root.fieldFontSize * 1.1)
horizontalAlignment: Text.AlignHCenter
+1 -1
View File
@@ -263,7 +263,7 @@ Item {
WlSessionLockSurface {
id: lockSurface
color: Color.background
color: Colors.background
LockView {
id: lockView
+8 -8
View File
@@ -81,17 +81,17 @@ Item {
property bool deleteConfirmOpen: false
property var 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
// singleton), so consumers can drop them straight into a Rectangle.
property color background: Color.menu.background
property color foreground: Color.menu.text
property color border: Color.menu.border
property color background: Colors.menu.background
property color foreground: Colors.menu.text
property color border: Colors.menu.border
property var borderSpec: Border.surfaceSpec("menu", "border", border, Math.max(1, Style.space(2)))
property color scrim: Color.menu.scrim
property color selectedBackground: Color.menu.selectedBackground
property color selectedText: Color.menu.selectedText
property color selectedBorder: Color.menu.selectedBorder
property color scrim: Colors.menu.scrim
property color selectedBackground: Colors.menu.selectedBackground
property color selectedText: Colors.menu.selectedText
property color selectedBorder: Colors.menu.selectedBorder
property var selectedBorderSpec: Border.surfaceSpec("menu", "selected-border", selectedBorder, 0)
readonly property real rowReservedBorderLeft: Border.left(selectedBorderSpec)
readonly property real rowReservedBorderRight: Border.right(selectedBorderSpec)
@@ -124,7 +124,7 @@ Item {
anchors.rightMargin: Style.spaceReal(10)
implicitWidth: Style.spaceReal(440)
implicitHeight: Style.spaceReal(420)
fillColor: Util.alpha(Color.background, Style.panelFillAlpha)
fillColor: Util.alpha(Colors.background, Style.panelFillAlpha)
spacing: Style.spaceReal(10)
Item {
@@ -137,7 +137,7 @@ Item {
anchors.verticalCenter: parent.verticalCenter
text: "Notifications"
textFormat: Text.PlainText
color: Color.foreground
color: Colors.foreground
font.family: Style.font.family
font.pixelSize: Style.font.body
font.bold: true
@@ -189,7 +189,7 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter
text: "\uf0a2"
textFormat: Text.PlainText
color: Util.alpha(Color.blue, 0.6)
color: Util.alpha(Colors.blue, 0.6)
font.family: Style.font.family
font.pixelSize: Style.font.heading
}
@@ -198,7 +198,7 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter
text: "No notifications"
textFormat: Text.PlainText
color: Util.alpha(Color.foreground, 0.6)
color: Util.alpha(Colors.foreground, 0.6)
font.family: Style.font.family
font.pixelSize: Style.font.bodySmall
}
@@ -10,7 +10,7 @@ Rectangle {
signal dismissRequested()
radius: Style.cardRadius
color: Util.alpha(Color.background, Style.cardFillAlpha)
color: Util.alpha(Colors.background, Style.cardFillAlpha)
implicitHeight: layout.implicitHeight + Style.spaceReal(20)
Rectangle {
@@ -18,7 +18,7 @@ Rectangle {
anchors.top: parent.top
anchors.bottom: parent.bottom
width: Style.spaceReal(3)
color: Color.accent
color: Colors.accent
}
Column {
@@ -40,7 +40,7 @@ Rectangle {
anchors.left: parent.left
text: root.app.length > 0 ? root.app : "Notification"
textFormat: Text.PlainText
color: Color.accent
color: Colors.accent
font.family: Style.font.family
font.pixelSize: Style.font.bodySmall
font.bold: true
@@ -50,7 +50,7 @@ Rectangle {
anchors.right: parent.right
text: "\uf00d"
textFormat: Text.PlainText
color: closeHover.hovered ? Color.urgent : Color.magenta
color: closeHover.hovered ? Colors.urgent : Colors.magenta
font.family: Style.font.family
font.pixelSize: Style.font.bodySmall
@@ -69,7 +69,7 @@ Rectangle {
text: root.summary
textFormat: Text.PlainText
wrapMode: Text.WordWrap
color: Color.foreground
color: Colors.foreground
font.family: Style.font.family
font.pixelSize: Style.font.bodySmall
font.bold: true
@@ -83,7 +83,7 @@ Rectangle {
wrapMode: Text.WordWrap
maximumLineCount: 4
elide: Text.ElideRight
color: Util.alpha(Color.foreground, 0.8)
color: Util.alpha(Colors.foreground, 0.8)
font.family: Style.font.family
font.pixelSize: Style.font.bodySmall
}
@@ -46,10 +46,10 @@ BorderSurface {
readonly property string sanitizedBody: sanitizeBody(body)
readonly property string styledBody: NotificationLogic.styledBody(body, app, appIcon)
readonly property color dimColor: Qt.darker(Color.notifications.text, 1.4)
readonly property color bodyColor: Qt.darker(Color.notifications.text, 1.15)
readonly property color accentColor: urgency === 2 ? Color.urgent : (urgency === 0 ? dimColor : Color.notifications.countdown)
readonly property var cardBorderSpec: Border.surfaceSpec("notifications", "border", Color.notifications.border, Math.max(1, Style.space(2)))
readonly property color dimColor: Qt.darker(Colors.notifications.text, 1.4)
readonly property color bodyColor: Qt.darker(Colors.notifications.text, 1.15)
readonly property color accentColor: urgency === 2 ? Colors.urgent : (urgency === 0 ? dimColor : Colors.notifications.countdown)
readonly property var cardBorderSpec: Border.surfaceSpec("notifications", "border", Colors.notifications.border, Math.max(1, Style.space(2)))
function sanitizeBody(s) {
return NotificationLogic.sanitizeBody(s, app, appIcon)
@@ -68,7 +68,7 @@ BorderSurface {
// doesn't push content under the bottom edge.
implicitHeight: mainColumn.implicitHeight + borderTop + borderBottom
radius: cornerRadius
color: Color.notifications.background
color: Colors.notifications.background
borderSpec: cardBorderSpec
clip: true
@@ -137,7 +137,7 @@ BorderSurface {
anchors.centerIn: parent
visible: root.hasGlyph && smallIconImage.status !== Image.Ready
text: root.glyph
color: Color.notifications.text
color: Colors.notifications.text
font.family: root.fontFamily
font.pixelSize: Style.font.displayLarge
}
@@ -148,7 +148,7 @@ BorderSurface {
Layout.alignment: Qt.AlignVCenter
visible: root.compactGlyph
text: root.glyph
color: Color.notifications.text
color: Colors.notifications.text
font.family: root.fontFamily
font.pixelSize: Style.font.icon
}
@@ -168,7 +168,7 @@ BorderSurface {
visible: root.summary.length > 0
text: root.summary
font.family: "Liberation Sans"
color: Color.notifications.text
color: Colors.notifications.text
font.pixelSize: Style.font.title
font.bold: true
wrapMode: Text.WordWrap
+6 -6
View File
@@ -143,8 +143,8 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
anchors.bottomMargin: Style.space(67)
color: Util.alpha(Color.background, 0.97)
borderSpec: Border.surfaceSpec("popups", "border", Color.popups.border, Math.max(1, Style.space(2)))
color: Util.alpha(Colors.background, 0.97)
borderSpec: Border.surfaceSpec("popups", "border", Colors.popups.border, Math.max(1, Style.space(2)))
radius: Style.cornerRadius
opacity: root.opened ? 1 : 0
@@ -166,7 +166,7 @@ Item {
anchors.verticalCenter: parent.verticalCenter
text: root.icon
font: iconMetrics.font
color: Color.popups.text
color: Colors.popups.text
}
}
Rectangle {
@@ -174,11 +174,11 @@ Item {
width: root.barWidth
height: Math.max(Style.space(6), Style.spacing.sm)
anchors.verticalCenter: parent.verticalCenter
color: Util.alpha(Color.popups.text, 0.45)
color: Util.alpha(Colors.popups.text, 0.45)
Rectangle {
height: parent.height
width: parent.width * (root.hasProgress ? root.value / root.maxValue : 0)
color: Color.accent
color: Colors.accent
Behavior on width {
enabled: root.opened
@@ -196,7 +196,7 @@ Item {
anchors.verticalCenter: parent.verticalCenter
text: root.message
font: messageMetrics.font
color: Color.popups.text
color: Colors.popups.text
elide: Text.ElideRight
maximumLineCount: 1
}
+2 -2
View File
@@ -177,10 +177,10 @@ Panel {
readonly property string toggleHint: anyAudible ? "Mute" : "Unmute"
readonly property color hoverFill: bar
? Style.hoverFillFor(bar.foreground, Color.accent)
? Style.hoverFillFor(bar.foreground, Colors.accent)
: "transparent"
readonly property color selectedFill: bar
? Style.selectedFillFor(bar.foreground, Color.accent)
? Style.selectedFillFor(bar.foreground, Colors.accent)
: "transparent"
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 color hoverFill: bar
? Style.hoverFillFor(bar.foreground, Color.accent)
? Style.hoverFillFor(bar.foreground, Colors.accent)
: "transparent"
readonly property color selectedFill: bar
? Style.selectedFillFor(bar.foreground, Color.accent)
? Style.selectedFillFor(bar.foreground, Colors.accent)
: "transparent"
function sectionCount(section) {
+1 -1
View File
@@ -152,7 +152,7 @@ Panel {
text: root.errorMessage !== "" ? root.errorMessage : "Loading usage..."
textFormat: Text.PlainText
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.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
// 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
function open() {
@@ -266,7 +266,7 @@ Panel {
anchors.baseline: heroDate.baseline
text: "󰃭"
color: heroMouse.containsMouse
? Style.hoverStateColor(root.contentForeground, Color.accent)
? Style.hoverStateColor(root.contentForeground, Colors.accent)
: root.contentForeground
font.family: root.contentFontFamily
// Decorative, and deliberately outside the Style.font.*
@@ -281,7 +281,7 @@ Panel {
anchors.verticalCenter: parent.verticalCenter
text: Qt.formatDate(root.today, "MMMM d")
color: heroMouse.containsMouse
? Style.hoverStateColor(root.contentForeground, Color.accent)
? Style.hoverStateColor(root.contentForeground, Colors.accent)
: root.contentForeground
font.family: root.contentFontFamily
font.pixelSize: 52
@@ -419,7 +419,7 @@ Panel {
width: Math.round(parent.width * root.yearDone)
height: parent.height
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 } }
}
@@ -477,7 +477,7 @@ Panel {
width: Math.round(parent.width * root.lifeDone)
height: parent.height
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 } }
}
@@ -154,7 +154,7 @@ Item {
anchors.centerIn: parent
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)
Item {
@@ -171,7 +171,7 @@ Item {
text: "Display layout"
textFormat: Text.PlainText
elide: Text.ElideRight
color: Color.foreground
color: Colors.foreground
font.family: Style.font.family
font.pixelSize: Style.font.body
font.bold: true
@@ -192,7 +192,7 @@ Item {
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."
textFormat: Text.PlainText
color: Util.alpha(Color.foreground, 0.6)
color: Util.alpha(Colors.foreground, 0.6)
font.family: Style.font.family
font.pixelSize: Style.font.bodySmall
}
@@ -19,10 +19,10 @@ Rectangle {
Math.max(1, width - 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
border.width: 1
border.color: Util.alpha(Color.foreground, 0.15)
border.color: Util.alpha(Colors.foreground, 0.15)
clip: true
Item {
@@ -53,7 +53,7 @@ Rectangle {
visible: root.monitors.length === 0
text: "No monitors reported"
textFormat: Text.PlainText
color: Util.alpha(Color.foreground, 0.6)
color: Util.alpha(Colors.foreground, 0.6)
font.family: Style.font.family
font.pixelSize: Style.font.bodySmall
}
@@ -25,10 +25,10 @@ Rectangle {
radius: Style.cardRadius
color: root.selected
? Util.alpha(Color.accent, 0.35)
: Util.alpha(Color.background, Style.cardFillAlpha)
? Util.alpha(Colors.accent, 0.35)
: Util.alpha(Colors.background, Style.cardFillAlpha)
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
Column {
@@ -42,7 +42,7 @@ Rectangle {
elide: Text.ElideRight
text: root.name
textFormat: Text.PlainText
color: Color.foreground
color: Colors.foreground
font.family: Style.font.family
font.pixelSize: Style.font.bodySmall
font.bold: true
@@ -55,7 +55,7 @@ Rectangle {
visible: root.height > Style.spaceReal(44)
text: root.monitor ? root.monitor.width + "x" + root.monitor.height : ""
textFormat: Text.PlainText
color: Util.alpha(Color.foreground, 0.7)
color: Util.alpha(Colors.foreground, 0.7)
font.family: Style.font.family
font.pixelSize: Style.font.bodySmall
}
@@ -67,7 +67,7 @@ Rectangle {
visible: root.monitor && root.monitor.focused && root.height > Style.spaceReal(58)
text: "focused"
textFormat: Text.PlainText
color: Color.blue
color: Colors.blue
font.family: Style.font.family
font.pixelSize: Style.font.bodySmall
}
@@ -24,7 +24,7 @@ Column {
text: root.monitor ? root.monitor.name : ""
textFormat: Text.PlainText
elide: Text.ElideRight
color: Color.foreground
color: Colors.foreground
font.family: Style.font.family
font.pixelSize: Style.font.body
font.bold: true
@@ -35,7 +35,7 @@ Column {
text: root.monitor ? root.monitor.description : ""
textFormat: Text.PlainText
elide: Text.ElideRight
color: Util.alpha(Color.foreground, 0.65)
color: Util.alpha(Colors.foreground, 0.65)
font.family: Style.font.family
font.pixelSize: Style.font.bodySmall
}
@@ -57,7 +57,7 @@ Column {
Text {
text: "Mode"
textFormat: Text.PlainText
color: Util.alpha(Color.foreground, 0.75)
color: Util.alpha(Colors.foreground, 0.75)
font.family: Style.font.family
font.pixelSize: Style.font.bodySmall
}
@@ -81,7 +81,7 @@ Column {
Text {
text: "Scale"
textFormat: Text.PlainText
color: Util.alpha(Color.foreground, 0.75)
color: Util.alpha(Colors.foreground, 0.75)
font.family: Style.font.family
font.pixelSize: Style.font.bodySmall
}
@@ -107,7 +107,7 @@ Column {
wrapMode: Text.WordWrap
text: "Only scales that land on whole pixels are offered. Hyprland steps in 1/120 and rejects the rest."
textFormat: Text.PlainText
color: Util.alpha(Color.foreground, 0.55)
color: Util.alpha(Colors.foreground, 0.55)
font.family: Style.font.family
font.pixelSize: Style.font.bodySmall
}
+3 -3
View File
@@ -126,7 +126,7 @@ Item {
anchors.centerIn: parent
implicitWidth: Style.spaceReal(720)
implicitHeight: Style.spaceReal(520)
fillColor: Util.alpha(Color.background, Style.panelFillAlpha)
fillColor: Util.alpha(Colors.background, Style.panelFillAlpha)
spacing: Style.spaceReal(10)
Item {
@@ -139,7 +139,7 @@ Item {
anchors.verticalCenter: parent.verticalCenter
text: "Wallpapers"
textFormat: Text.PlainText
color: Color.foreground
color: Colors.foreground
font.family: Style.font.family
font.pixelSize: Style.font.body
font.bold: true
@@ -191,7 +191,7 @@ Item {
? root.selectedName + ": " + root.assignedPath.replace(/^.*\//, "")
: root.selectedName + ": following the global wallpaper")
textFormat: Text.PlainText
color: Util.alpha(Color.foreground, 0.7)
color: Util.alpha(Colors.foreground, 0.7)
font.family: Style.font.family
font.pixelSize: Style.font.bodySmall
}
@@ -57,11 +57,11 @@ Item {
anchors.fill: parent
anchors.margins: Style.spaceReal(3)
radius: Style.cardRadius
color: Util.alpha(Color.background, Style.cardFillAlpha)
color: Util.alpha(Colors.background, Style.cardFillAlpha)
border.width: Style.cardBorderWidth
border.color: modelData === root.assignedPath
? Color.accent
: (hover.hovered ? Color.blue : Util.alpha(Color.blue, Style.cardBorderAlpha))
? Colors.accent
: (hover.hovered ? Colors.blue : Util.alpha(Colors.blue, Style.cardBorderAlpha))
clip: true
Image {
@@ -81,7 +81,7 @@ Item {
anchors.margins: Style.cardBorderWidth
height: caption.implicitHeight + Style.spaceReal(4)
visible: hover.hovered || modelData === root.assignedPath
color: Util.alpha(Color.background, 0.8)
color: Util.alpha(Colors.background, 0.8)
Text {
id: caption
@@ -91,7 +91,7 @@ Item {
elide: Text.ElideMiddle
text: String(modelData).replace(/^.*\//, "")
textFormat: Text.PlainText
color: Color.foreground
color: Colors.foreground
font.family: Style.font.family
font.pixelSize: Style.font.bodySmall
}
@@ -113,7 +113,7 @@ Item {
visible: root.wallpapers.length === 0
text: "No images in " + root.directory
textFormat: Text.PlainText
color: Util.alpha(Color.foreground, 0.6)
color: Util.alpha(Colors.foreground, 0.6)
font.family: Style.font.family
font.pixelSize: Style.font.bodySmall
}
@@ -31,9 +31,9 @@ Rectangle {
implicitHeight: form.implicitHeight + Style.spaceReal(24)
radius: Style.cardRadius
color: Util.alpha(Color.foreground, 0.06)
color: Util.alpha(Colors.foreground, 0.06)
border.width: 1
border.color: Util.alpha(Color.accent, 0.6)
border.color: Util.alpha(Colors.accent, 0.6)
Column {
id: form
@@ -47,7 +47,7 @@ Rectangle {
text: !root.binding ? "New binding"
: (root.binding.origin === "personal" ? "Edit binding" : "Replace default binding")
textFormat: Text.PlainText
color: Color.foreground
color: Colors.foreground
font.family: Style.font.family
font.pixelSize: Style.font.bodySmall
font.bold: true
@@ -86,7 +86,7 @@ Rectangle {
? "Replaces your binding: " + root.conflict.description
: "Disables the default: " + root.conflict.description)
textFormat: Text.PlainText
color: Color.urgent
color: Colors.urgent
font.family: Style.font.family
font.pixelSize: Style.font.caption
}
+6 -6
View File
@@ -22,7 +22,7 @@ Rectangle {
implicitHeight: Style.spaceReal(46)
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 {
id: hover
@@ -36,9 +36,9 @@ Rectangle {
width: Style.spaceReal(200)
height: Style.spaceReal(26)
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.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
Text {
@@ -49,7 +49,7 @@ Rectangle {
text: root.binding ? root.binding.keys : ""
textFormat: Text.PlainText
elide: Text.ElideRight
color: Color.foreground
color: Colors.foreground
font.family: Style.font.family
font.pixelSize: Style.font.bodySmall
font.bold: true
@@ -70,7 +70,7 @@ Rectangle {
text: root.binding ? root.binding.description : ""
textFormat: Text.PlainText
elide: Text.ElideRight
color: Color.foreground
color: Colors.foreground
font.family: Style.font.family
font.pixelSize: Style.font.bodySmall
font.bold: true
@@ -81,7 +81,7 @@ Rectangle {
text: root.stateText
textFormat: Text.PlainText
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.pixelSize: Style.font.caption
}
+2 -2
View File
@@ -136,7 +136,7 @@ Item {
anchors.centerIn: parent
implicitWidth: Math.min(Style.spaceReal(760), panelWindow.width - 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)
KeybindsHeader {
@@ -214,7 +214,7 @@ Item {
text: root.statusText.length > 0 ? root.statusText
: root.visibleBindings.length + " bindings. Changes go to ~/.config/hypr/bindings.lua and Hyprland reloads."
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.pixelSize: Style.font.caption
}
@@ -19,7 +19,7 @@ Item {
text: "Keybindings"
textFormat: Text.PlainText
elide: Text.ElideRight
color: Color.foreground
color: Colors.foreground
font.family: Style.font.family
font.pixelSize: Style.font.body
font.bold: true
+2 -2
View File
@@ -867,8 +867,8 @@ Panel {
onHasCursorChanged: if (hasCursor) root.ensureCursorVisible(monitorRow)
current: isFocused
foreground: root.bar.foreground
fill: Style.hoverFillFor(root.bar.foreground, Color.accent)
currentFill: Style.selectedFillFor(root.bar.foreground, Color.accent)
fill: Style.hoverFillFor(root.bar.foreground, Colors.accent)
currentFill: Style.selectedFillFor(root.bar.foreground, Colors.accent)
implicitHeight: monitorInner.implicitHeight + Style.spacing.xl
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
// at the root; items never read containsMouse for visuals. See
// 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 selectedFill: bar ? Style.selectedFillFor(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, Colors.accent) : "transparent"
// scannerEnabled lives on the shared WifiDevice, which has no reference
// counting, and a bar widget is instantiated once per monitor. Tracking the
@@ -1976,7 +1976,7 @@ Panel {
anchors.verticalCenter: parent.verticalCenter
height: Style.spacing.controlHeight
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
Text {
+1 -1
View File
@@ -88,7 +88,7 @@ Panel {
}
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
@@ -33,7 +33,7 @@ Item {
CalendarView {
id: calendar
width: parent.width
foreground: Color.foreground
foreground: Colors.foreground
fontFamily: Style.font.family
cellSpacing: Style.space(2)
cellWidth: Math.floor((width - cellSpacing * 6) / 7)
@@ -52,7 +52,7 @@ Column {
wrapMode: Text.WordWrap
text: "Stay Awake is on, so neither starts until it is turned off."
textFormat: Text.PlainText
color: Util.alpha(Color.foreground, 0.6)
color: Util.alpha(Colors.foreground, 0.6)
font.family: Style.font.family
font.pixelSize: Style.font.bodySmall
}
@@ -22,7 +22,7 @@ Item {
Text {
text: root.clock
textFormat: Text.PlainText
color: Color.foreground
color: Colors.foreground
font.family: Style.font.family
font.pixelSize: Style.font.heading
font.bold: true
@@ -31,7 +31,7 @@ Item {
Text {
text: root.today
textFormat: Text.PlainText
color: Util.alpha(Color.foreground, 0.75)
color: Util.alpha(Colors.foreground, 0.75)
font.family: Style.font.family
font.pixelSize: Style.font.bodySmall
}
@@ -23,9 +23,9 @@ Item {
width: Style.spaceReal(48)
height: width
radius: Style.cardRadius
color: Util.alpha(Color.background, Style.cardFillAlpha)
color: Util.alpha(Colors.background, Style.cardFillAlpha)
border.width: Style.cardBorderWidth
border.color: Util.alpha(Color.blue, Style.cardBorderAlpha)
border.color: Util.alpha(Colors.blue, Style.cardBorderAlpha)
clip: true
Image {
@@ -45,7 +45,7 @@ Item {
anchors.centerIn: parent
visible: !root.hasArt || thumbnailImage.status !== Image.Ready
text: ""
color: Util.alpha(Color.foreground, 0.6)
color: Util.alpha(Colors.foreground, 0.6)
font.family: Style.font.family
font.pixelSize: Style.font.title
}
@@ -65,7 +65,7 @@ Item {
text: root.title
textFormat: Text.PlainText
elide: Text.ElideRight
color: Color.foreground
color: Colors.foreground
font.family: Style.font.family
font.pixelSize: Style.font.bodySmall
font.bold: true
@@ -77,7 +77,7 @@ Item {
textFormat: Text.PlainText
elide: Text.ElideRight
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.pixelSize: Style.font.bodySmall
}
@@ -101,7 +101,7 @@ Column {
visible: stats.loadAverage !== ""
text: "Load average " + stats.loadAverage
textFormat: Text.PlainText
color: Util.alpha(Color.foreground, 0.7)
color: Util.alpha(Colors.foreground, 0.7)
font.family: Style.font.family
font.pixelSize: Style.font.bodySmall
}
@@ -32,8 +32,8 @@ Item {
readonly property int screensaverSeconds: root.timeoutSeconds(idleConfig.screensaver, 150)
readonly property int lockSeconds: root.timeoutSeconds(idleConfig.lock, 300)
readonly property color floatingFillColor: Util.alpha(Color.background, Style.panelFillAlpha)
readonly property color floatingBorderColor: Qt.tint(Color.background, Util.alpha(Color.blue, Style.cardBorderAlpha))
readonly property color floatingFillColor: Util.alpha(Colors.background, Style.panelFillAlpha)
readonly property color floatingBorderColor: Qt.tint(Colors.background, Util.alpha(Colors.blue, Style.cardBorderAlpha))
readonly property int barInset: {
var bar = root.shell ? root.shell.bar : null
@@ -19,7 +19,7 @@ Item {
width: Style.spaceReal(22)
text: root.icon
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.pixelSize: Style.font.body
@@ -37,13 +37,13 @@ Item {
anchors.verticalCenter: parent.verticalCenter
height: Style.spaceReal(8)
radius: Style.cardRadius
color: Util.alpha(Color.foreground, 0.2)
color: Util.alpha(Colors.foreground, 0.2)
Rectangle {
width: parent.width * Math.max(0, Math.min(100, root.value)) / 100
height: parent.height
radius: Style.cardRadius
color: Color.accent
color: Colors.accent
}
Rectangle {
@@ -52,7 +52,7 @@ Item {
width: Style.spaceReal(14)
height: width
radius: Style.cardRadius
color: Color.foreground
color: Colors.foreground
}
TapHandler {
@@ -78,7 +78,7 @@ Item {
horizontalAlignment: Text.AlignRight
text: root.value + "%"
textFormat: Text.PlainText
color: Color.foreground
color: Colors.foreground
font.family: Style.font.family
font.pixelSize: Style.font.bodySmall
}
@@ -54,7 +54,7 @@ Column {
horizontalAlignment: Text.AlignHCenter
text: "Nothing playing"
textFormat: Text.PlainText
color: Util.alpha(Color.foreground, 0.6)
color: Util.alpha(Colors.foreground, 0.6)
font.family: Style.font.family
font.pixelSize: Style.font.bodySmall
}
+4 -4
View File
@@ -14,16 +14,16 @@ Rectangle {
implicitHeight: Style.spaceReal(58)
radius: Style.cardRadius
color: root.active
? Color.accent
: (hover.hovered ? Util.alpha(Color.blue, 0.3) : Util.alpha(Color.foreground, 0.1))
? Colors.accent
: (hover.hovered ? Util.alpha(Colors.blue, 0.3) : Util.alpha(Colors.foreground, 0.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 {
ColorAnimation { duration: 150 }
}
readonly property color contentColor: root.active ? Color.background : Color.foreground
readonly property color contentColor: root.active ? Colors.background : Colors.foreground
Column {
anchors.centerIn: parent
@@ -41,7 +41,7 @@ Item {
width: Style.spaceReal(22)
text: root.icon
textFormat: Text.PlainText
color: Color.magenta
color: Colors.magenta
font.family: Style.font.family
font.pixelSize: Style.font.body
}
@@ -53,7 +53,7 @@ Item {
anchors.verticalCenter: parent.verticalCenter
text: root.label
textFormat: Text.PlainText
color: Color.foreground
color: Colors.foreground
font.family: Style.font.family
font.pixelSize: Style.font.bodySmall
}
@@ -75,7 +75,7 @@ Item {
horizontalAlignment: Text.AlignHCenter
text: root.formatSeconds(root.seconds)
textFormat: Text.PlainText
color: Color.foreground
color: Colors.foreground
font.family: Style.font.family
font.pixelSize: Style.font.bodySmall
}
@@ -22,7 +22,7 @@ Card {
visible: !root.available
text: "Weather unavailable"
textFormat: Text.PlainText
color: Util.alpha(Color.foreground, 0.7)
color: Util.alpha(Colors.foreground, 0.7)
font.family: Style.font.family
font.pixelSize: Style.font.bodySmall
}
+2 -2
View File
@@ -53,13 +53,13 @@ Item {
anchors.topMargin: Style.spaceReal(10)
anchors.rightMargin: Style.spaceReal(10)
implicitWidth: Style.spaceReal(400)
fillColor: Util.alpha(Color.background, Style.panelFillAlpha)
fillColor: Util.alpha(Colors.background, Style.panelFillAlpha)
spacing: Style.spaceReal(12)
Text {
text: "System Monitor"
textFormat: Text.PlainText
color: Color.foreground
color: Colors.foreground
font.family: Style.font.family
font.pixelSize: Style.font.body
font.bold: true
+3 -3
View File
@@ -646,7 +646,7 @@ Panel {
height: Style.space(18)
anchors.verticalCenter: parent.verticalCenter
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 {
textFormat: Text.PlainText
@@ -752,7 +752,7 @@ Panel {
width: parent.width
height: suggestionRow.implicitHeight + Style.space(12)
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 {
id: suggestionRow
@@ -764,7 +764,7 @@ Panel {
Text {
textFormat: Text.PlainText
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.pixelSize: Style.font.body
}
+12 -12
View File
@@ -11,14 +11,14 @@ Item {
id: root
property string fontFamily: Style.font.menuFamily
// Bound to the central [polkit] section in shell.toml via Color.qml.
property color accent: Color.polkit.accent
property color background: Color.polkit.background
property color foreground: Color.polkit.text
property color border: Color.polkit.border
property color borderError: Color.polkit.borderError
// Bound to the central [polkit] section in shell.toml via Colors.qml.
property color accent: Colors.polkit.accent
property color background: Colors.polkit.background
property color foreground: Colors.polkit.text
property color border: Colors.polkit.border
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 color scrim: Color.polkit.scrim
property color scrim: Colors.polkit.scrim
readonly property int cornerRadius: Style.cornerRadius
property int contentMargin: Style.spacing.panelPadding
property int fieldHeight: Math.max(Style.space(42), Style.spacing.controlHeight)
@@ -278,7 +278,7 @@ Item {
text: "\udb80\ude37"
fontFamily: root.fontFamily
fontSize: Math.round(root.fieldHeight * 0.7)
color: root.errorFlash ? Color.polkit.textError : root.accent
color: root.errorFlash ? Colors.polkit.textError : root.accent
}
Row {
@@ -293,7 +293,7 @@ Item {
Text {
text: "\uf023"
color: root.errorFlash ? Color.polkit.textError : root.accent
color: root.errorFlash ? Colors.polkit.textError : root.accent
font.family: root.fontFamily
font.pixelSize: Style.font.iconLarge
width: Style.space(26)
@@ -318,7 +318,7 @@ Item {
font.pixelSize: Style.font.iconLarge
echoMode: root.responseVisible ? TextInput.Normal : TextInput.Password
passwordCharacter: "\u2022"
color: root.errorFlash ? Color.polkit.textError : root.foreground
color: root.errorFlash ? Colors.polkit.textError : root.foreground
cursorVisible: activeFocus && !root.submitted && !root.errorFlash
readOnly: root.submitted || root.errorFlash
enabled: root.dialogVisible
@@ -337,7 +337,7 @@ Item {
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
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
font.family: root.fontFamily
font.pixelSize: Style.font.iconLarge
@@ -350,7 +350,7 @@ Item {
height: Style.space(24)
anchors.left: parent.left
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
}
+4 -4
View File
@@ -18,11 +18,11 @@ Item {
property string filterText: ""
property string fontFamily: Style.font.menuFamily
property color background: Color.menu.background
property color foreground: Color.menu.text
property color border: Color.menu.border
property color background: Colors.menu.background
property color foreground: Colors.menu.text
property color border: Colors.menu.border
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
property int contentMargin: Style.spacing.panelPadding
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)
height: Style.space(64)
radius: Style.spacing.labelGap
color: Style.normalFillFor(root.bar.foreground, Color.accent)
borderSpec: Border.controlSpec("normal", root.bar.foreground, Color.accent)
color: Style.normalFillFor(root.bar.foreground, Colors.accent)
borderSpec: Border.controlSpec("normal", root.bar.foreground, Colors.accent)
Image {
anchors.fill: parent
@@ -247,8 +247,8 @@ BarWidget {
width: sourceList.width
height: sourceInner.implicitHeight + Style.space(10)
radius: Style.spacing.labelGap
color: selected ? Style.selectedFillFor(root.bar.foreground, Color.accent) : "transparent"
borderSpec: selected ? Border.controlSpec("normal", root.bar.foreground, Color.accent) : Border.none()
color: selected ? Style.selectedFillFor(root.bar.foreground, Colors.accent) : "transparent"
borderSpec: selected ? Border.controlSpec("normal", root.bar.foreground, Colors.accent) : Border.none()
Row {
id: sourceInner
Regular → Executable
View File
File mode changed.
+2 -2
View File
@@ -1593,8 +1593,8 @@ ShellRoot {
var shellRaw = ""
try { colorsRaw = Qt.atob(String(colorsB64 || "")) } catch (e) { colorsRaw = "" }
try { shellRaw = Qt.atob(String(shellB64 || "")) } catch (e2) { shellRaw = "" }
Color.loadColors(colorsRaw)
Color.loadShell(shellRaw)
Colors.loadColors(colorsRaw)
Colors.loadShell(shellRaw)
Style.scheduleRefresh()
return "ok"
}