Qualify shell palette references for Qt 6.12 (#14553)
This commit is contained in:
1 parent
902fd8aebd
commit
b83d3df084
74 files changed
+381
-293
No files matched your search
@@ -6,6 +6,7 @@ import Quickshell.Services.Mpris
|
||||
import Quickshell.Services.Pipewire
|
||||
import qs.Ui
|
||||
import qs.Commons
|
||||
import qs.Commons as Commons
|
||||
import "Model.js" as Model
|
||||
|
||||
Panel {
|
||||
@@ -179,10 +180,10 @@ Panel {
|
||||
readonly property string toggleHint: anyAudible ? "Mute" : "Unmute"
|
||||
|
||||
readonly property color hoverFill: bar
|
||||
? Style.hoverFillFor(bar.foreground, Color.accent)
|
||||
? Style.hoverFillFor(bar.foreground, Commons.Color.accent)
|
||||
: "transparent"
|
||||
readonly property color selectedFill: bar
|
||||
? Style.selectedFillFor(bar.foreground, Color.accent)
|
||||
? Style.selectedFillFor(bar.foreground, Commons.Color.accent)
|
||||
: "transparent"
|
||||
|
||||
function sectionCount(section) {
|
||||
|
||||
@@ -6,6 +6,7 @@ import Quickshell.Bluetooth
|
||||
import Quickshell.Services.Pipewire
|
||||
import qs.Ui
|
||||
import qs.Commons
|
||||
import qs.Commons as Commons
|
||||
import "Model.js" as Model
|
||||
|
||||
Panel {
|
||||
@@ -104,10 +105,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, Commons.Color.accent)
|
||||
: "transparent"
|
||||
readonly property color selectedFill: bar
|
||||
? Style.selectedFillFor(bar.foreground, Color.accent)
|
||||
? Style.selectedFillFor(bar.foreground, Commons.Color.accent)
|
||||
: "transparent"
|
||||
|
||||
function sectionCount(section) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import qs.Commons
|
||||
import qs.Commons as Commons
|
||||
import qs.Ui
|
||||
import "Model.js" as Model
|
||||
|
||||
@@ -75,7 +76,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 : Commons.Color.foreground
|
||||
readonly property string contentFontFamily: bar ? bar.fontFamily : Style.font.family
|
||||
|
||||
readonly property int cellWidth: Style.space(52)
|
||||
@@ -302,7 +303,7 @@ Panel {
|
||||
anchors.baseline: heroDate.baseline
|
||||
text: ""
|
||||
color: heroMouse.containsMouse
|
||||
? Style.hoverStateColor(root.contentForeground, Color.accent)
|
||||
? Style.hoverStateColor(root.contentForeground, Commons.Color.accent)
|
||||
: root.contentForeground
|
||||
font.family: root.contentFontFamily
|
||||
// Decorative, and deliberately outside the Style.font.*
|
||||
@@ -317,7 +318,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, Commons.Color.accent)
|
||||
: root.contentForeground
|
||||
font.family: root.contentFontFamily
|
||||
font.pixelSize: 52
|
||||
@@ -455,7 +456,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, Commons.Color.accent)
|
||||
|
||||
Behavior on width { NumberAnimation { duration: Style.duration(160); easing.type: Easing.OutCubic } }
|
||||
}
|
||||
@@ -513,7 +514,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, Commons.Color.accent)
|
||||
|
||||
Behavior on width { NumberAnimation { duration: Style.duration(160); easing.type: Easing.OutCubic } }
|
||||
}
|
||||
@@ -575,14 +576,14 @@ Panel {
|
||||
height: Style.space(16)
|
||||
radius: Style.cornerRadius
|
||||
color: weekStartMouse.containsMouse
|
||||
? Style.hoverFillFor(root.contentForeground, Color.accent)
|
||||
? Style.hoverFillFor(root.contentForeground, Commons.Color.accent)
|
||||
: "transparent"
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
text: "W"
|
||||
color: weekStartMouse.containsMouse
|
||||
? Style.hoverStateColor(root.contentForeground, Color.accent)
|
||||
? Style.hoverStateColor(root.contentForeground, Commons.Color.accent)
|
||||
: Qt.darker(root.contentForeground, 1.9)
|
||||
font.family: root.contentFontFamily
|
||||
font.pixelSize: Style.font.caption
|
||||
@@ -667,7 +668,7 @@ Panel {
|
||||
// over a grid this quiet.
|
||||
color: "transparent"
|
||||
border.width: modelData.today ? Style.spacing.hairline : 0
|
||||
border.color: Style.normalBorderFor(root.contentForeground, Color.accent)
|
||||
border.color: Style.normalBorderFor(root.contentForeground, Commons.Color.accent)
|
||||
|
||||
Text {
|
||||
textFormat: Text.PlainText
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import QtQuick
|
||||
import QtQuick.Shapes
|
||||
import qs.Commons
|
||||
import qs.Commons as Commons
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property real iconSize: Style.font.icon
|
||||
property color color: Color.foreground
|
||||
property color color: Commons.Color.foreground
|
||||
|
||||
width: iconSize * 1.18
|
||||
height: iconSize
|
||||
|
||||
@@ -4,6 +4,7 @@ import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import qs.Commons
|
||||
import qs.Commons as Commons
|
||||
import qs.Ui
|
||||
import "Model.js" as Model
|
||||
|
||||
@@ -32,8 +33,8 @@ Panel {
|
||||
"Cataloging chaos"
|
||||
]
|
||||
readonly property string heroPhraseText: activePhrases[phraseIndex % activePhrases.length]
|
||||
readonly property color foreground: bar ? bar.foreground : Color.foreground
|
||||
readonly property color urgent: bar ? bar.urgent : Color.urgent
|
||||
readonly property color foreground: bar ? bar.foreground : Commons.Color.foreground
|
||||
readonly property color urgent: bar ? bar.urgent : Commons.Color.urgent
|
||||
readonly property color dim: Qt.darker(foreground, 1.55)
|
||||
readonly property string fontFamily: bar ? bar.fontFamily : Style.font.family
|
||||
readonly property color iconColor: dropbox.authenticated && dropbox.active ? foreground : dim
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import QtQuick
|
||||
import qs.Commons
|
||||
import qs.Commons as Commons
|
||||
import "Arc.js" as Arc
|
||||
|
||||
// One line of text arched over what sits below it, each character turned to
|
||||
@@ -13,7 +14,7 @@ Item {
|
||||
property real rise: 6
|
||||
property string fontFamily: Style.font.family
|
||||
property int pixelSize: Style.font.caption
|
||||
property color color: Color.foreground
|
||||
property color color: Commons.Color.foreground
|
||||
|
||||
FontMetrics {
|
||||
id: metrics
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import qs.Commons
|
||||
import qs.Commons as Commons
|
||||
import qs.Ui
|
||||
import "Model.js" as Model
|
||||
import "Greetings.js" as Greet
|
||||
@@ -52,7 +53,7 @@ Rectangle {
|
||||
// arrow keys never reads darker than the daytime rows around it.
|
||||
readonly property bool picked: panel.focusIndex === index && !panel.addSelected
|
||||
readonly property bool lit: rowHover.hovered || picked
|
||||
color: Model.mix(Color.popups.background, foreground,
|
||||
color: Model.mix(Commons.Color.popups.background, foreground,
|
||||
picked ? dayFill + hoverLift : rowHover.hovered ? phaseFill + hoverLift : phaseFill)
|
||||
|
||||
// Transforms leave the Column's layout alone: the knock that clears the
|
||||
@@ -297,8 +298,8 @@ Rectangle {
|
||||
anchors.verticalCenter: parent.top
|
||||
size: fontSize + (Style.space(22) - fontSize) * 0.85
|
||||
radius: size / 2
|
||||
color: Model.mix(Color.popups.background, row.foreground, _hot ? 0.24 : 0.14)
|
||||
borderSpec: Border.flat(Model.mix(Color.popups.background, row.foreground, _hot ? 0.65 : 0.35), Style.space(1))
|
||||
color: Model.mix(Commons.Color.popups.background, row.foreground, _hot ? 0.24 : 0.14)
|
||||
borderSpec: Border.flat(Model.mix(Commons.Color.popups.background, row.foreground, _hot ? 0.65 : 0.35), Style.space(1))
|
||||
iconText: "\u00d7"
|
||||
tooltipText: "Remove"
|
||||
foreground: row.dim
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import QtQuick
|
||||
import qs.Commons
|
||||
import qs.Commons as Commons
|
||||
import qs.Ui
|
||||
import "Model.js" as Model
|
||||
|
||||
@@ -20,7 +21,7 @@ Column {
|
||||
property string placeholderText: "Search cities\u2026"
|
||||
property string loadingText: "Loading zones\u2026"
|
||||
property real fontSize: Style.font.bodySmall
|
||||
property color foreground: Color.foreground
|
||||
property color foreground: Commons.Color.foreground
|
||||
property color dim: Qt.darker(foreground, 1.55)
|
||||
property color fainter: Qt.darker(foreground, 2.1)
|
||||
property string fontFamily: Style.font.family
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import qs.Commons
|
||||
import qs.Commons as Commons
|
||||
import qs.Ui
|
||||
import "Model.js" as Model
|
||||
import "Sun.js" as Sun
|
||||
@@ -22,7 +23,7 @@ Item {
|
||||
property bool hovered: false
|
||||
property bool hour24: false
|
||||
property real moonPhase: 0
|
||||
property color foreground: Color.foreground
|
||||
property color foreground: Commons.Color.foreground
|
||||
property color fainter: Qt.darker(foreground, 2.1)
|
||||
property color daylightMarker: "#E5C736"
|
||||
property string fontFamily: Style.font.family
|
||||
|
||||
@@ -2,6 +2,7 @@ import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import qs.Commons
|
||||
import qs.Commons as Commons
|
||||
import qs.Ui
|
||||
import "GlobeModel.js" as Solar
|
||||
import "Model.js" as Model
|
||||
@@ -11,14 +12,14 @@ import "Model.js" as Model
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property color foreground: Color.foreground
|
||||
property color foreground: Commons.Color.foreground
|
||||
property color dim: Qt.darker(foreground, 1.55)
|
||||
property color fainter: Qt.darker(foreground, 2.1)
|
||||
property color daylightMarker
|
||||
// Passed in so the footer's moon agrees with the rows' strips.
|
||||
property real moonPhase: 0.5
|
||||
// Night dots are dark so they read against the bright continents.
|
||||
readonly property color nightMarker: Util.alpha(Color.background, 0.92)
|
||||
readonly property color nightMarker: Util.alpha(Commons.Color.background, 0.92)
|
||||
property string fontFamily: Style.font.family
|
||||
property bool hour24: false
|
||||
// The panel's offset setting, and the offset "home" is measured from.
|
||||
@@ -30,7 +31,7 @@ Item {
|
||||
property real chromeOpacity: 1
|
||||
|
||||
// Opaque tones mixed against the background, so the rows behind never show through.
|
||||
readonly property color surfaceBase: Color.popups.background
|
||||
readonly property color surfaceBase: Commons.Color.popups.background
|
||||
// Light names over sea, dark over land, split at the coastline.
|
||||
readonly property color seaInk: foreground
|
||||
readonly property color landInk: surfaceBase
|
||||
@@ -470,26 +471,26 @@ Item {
|
||||
ctx.fillStyle = day ? root.daylightMarker : root.nightMarker
|
||||
ctx.fill()
|
||||
ctx.lineWidth = root.scaled(1.2)
|
||||
ctx.strokeStyle = day ? Util.alpha(Color.background, 0.7) : Util.alpha(fg, 0.85)
|
||||
ctx.strokeStyle = day ? Util.alpha(Commons.Color.background, 0.7) : Util.alpha(fg, 0.85)
|
||||
ctx.stroke()
|
||||
if (root.isHome(i)) {
|
||||
ctx.beginPath()
|
||||
ctx.arc(p.x, p.y, root.scaled(3.4), 0, Math.PI * 2)
|
||||
ctx.fillStyle = Color.accent
|
||||
ctx.fillStyle = Commons.Color.accent
|
||||
ctx.fill()
|
||||
ctx.lineWidth = root.scaled(1.2)
|
||||
ctx.strokeStyle = Util.alpha(Color.background, 0.5)
|
||||
ctx.strokeStyle = Util.alpha(Commons.Color.background, 0.5)
|
||||
ctx.stroke()
|
||||
ctx.beginPath()
|
||||
ctx.arc(p.x, p.y, root.scaled(6.4), 0, Math.PI * 2)
|
||||
ctx.lineWidth = root.scaled(1.4)
|
||||
ctx.strokeStyle = Util.alpha(Color.accent, 0.65)
|
||||
ctx.strokeStyle = Util.alpha(Commons.Color.accent, 0.65)
|
||||
ctx.stroke()
|
||||
} else if (root.isTracked(i)) {
|
||||
ctx.beginPath()
|
||||
ctx.arc(p.x, p.y, root.scaled(4.6), 0, Math.PI * 2)
|
||||
ctx.lineWidth = root.scaled(1.3)
|
||||
ctx.strokeStyle = Color.accent
|
||||
ctx.strokeStyle = Commons.Color.accent
|
||||
ctx.stroke()
|
||||
}
|
||||
if (isSel) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import QtQuick
|
||||
import qs.Commons
|
||||
import qs.Commons as Commons
|
||||
|
||||
// The selected city under the globe: name, local time and badge, then its
|
||||
// zone and offset. Blank without a selection; the parent reserves the height.
|
||||
@@ -12,7 +13,7 @@ Item {
|
||||
property string offsetLabel: ""
|
||||
property string badge: "" // "home", "tracked" or ""
|
||||
property real moonPhase: 0.5
|
||||
property color foreground: Color.foreground
|
||||
property color foreground: Commons.Color.foreground
|
||||
property color dim: Qt.darker(foreground, 1.55)
|
||||
property color fainter: Qt.darker(foreground, 2.1)
|
||||
property color daylightMarker
|
||||
@@ -90,7 +91,7 @@ Item {
|
||||
textFormat: Text.PlainText
|
||||
text: root.badge
|
||||
visible: root.has && text !== ""
|
||||
color: Color.accent
|
||||
color: Commons.Color.accent
|
||||
font.family: root.fontFamily
|
||||
font.pixelSize: Style.font.caption
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import QtQuick
|
||||
import qs.Commons
|
||||
import qs.Commons as Commons
|
||||
import "GlobeModel.js" as Solar
|
||||
|
||||
// "World [globe] Clock" under an arched caption. The little globe is the door
|
||||
@@ -10,7 +11,7 @@ Column {
|
||||
property string caption: ""
|
||||
property color captionColor: dim
|
||||
property bool captionClickable: false
|
||||
property color foreground: Color.foreground
|
||||
property color foreground: Commons.Color.foreground
|
||||
property color dim: Qt.darker(foreground, 1.55)
|
||||
property string fontFamily: Style.font.family
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import qs.Commons
|
||||
import qs.Commons as Commons
|
||||
import "GlobeModel.js" as Solar
|
||||
import "Model.js" as Model
|
||||
|
||||
@@ -11,7 +12,7 @@ Item {
|
||||
id: root
|
||||
|
||||
property real spin: 0
|
||||
property color color: Color.foreground
|
||||
property color color: Commons.Color.foreground
|
||||
// Below this size land turns to noise; draw the graticule alone.
|
||||
readonly property bool showLand: width >= 22
|
||||
|
||||
@@ -24,7 +25,7 @@ Item {
|
||||
property bool showMarker: false
|
||||
property real markerLat: 0
|
||||
property real markerLon: 0
|
||||
property color markerColor: Color.accent
|
||||
property color markerColor: Commons.Color.accent
|
||||
|
||||
readonly property real radius: Math.min(width, height) / 2 - 1
|
||||
readonly property string pluginDir: Quickshell.env("OMARCHY_PATH") + "/shell/plugins/panels/elsewhen"
|
||||
@@ -68,7 +69,7 @@ Item {
|
||||
// The ocean, opaque like the large globe.
|
||||
ctx.beginPath()
|
||||
ctx.arc(0, 0, r, 0, Math.PI * 2)
|
||||
ctx.fillStyle = Model.mix(Color.popups.background, c, root.bold ? 0.16 : 0.13)
|
||||
ctx.fillStyle = Model.mix(Commons.Color.popups.background, c, root.bold ? 0.16 : 0.13)
|
||||
ctx.fill()
|
||||
|
||||
ctx.save()
|
||||
@@ -117,7 +118,7 @@ Item {
|
||||
ctx.fill()
|
||||
// Edged so it does not dissolve into a continent of similar lightness.
|
||||
ctx.lineWidth = Math.max(1, r * 0.04)
|
||||
ctx.strokeStyle = Util.alpha(Color.background, 0.5)
|
||||
ctx.strokeStyle = Util.alpha(Commons.Color.background, 0.5)
|
||||
ctx.stroke()
|
||||
|
||||
ctx.beginPath()
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import QtQuick
|
||||
import qs.Commons
|
||||
import qs.Commons as Commons
|
||||
import "GlobeModel.js" as Solar
|
||||
|
||||
// The night marker drawn as the moon's current phase. The faint full disc
|
||||
@@ -8,7 +9,7 @@ Item {
|
||||
id: root
|
||||
|
||||
property real phase: 0 // 0 new, 0.25 first quarter, 0.5 full
|
||||
property color color: Color.foreground
|
||||
property color color: Commons.Color.foreground
|
||||
|
||||
onPhaseChanged: canvas.requestPaint()
|
||||
onColorChanged: canvas.requestPaint()
|
||||
|
||||
@@ -2,6 +2,7 @@ import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import qs.Commons
|
||||
import qs.Commons as Commons
|
||||
import qs.Ui
|
||||
import "Model.js" as Model
|
||||
import "GlobeModel.js" as Solar
|
||||
@@ -80,7 +81,7 @@ Panel {
|
||||
implicitWidth: button.implicitWidth
|
||||
implicitHeight: button.implicitHeight
|
||||
|
||||
readonly property color foreground: bar ? bar.foreground : Color.foreground
|
||||
readonly property color foreground: bar ? bar.foreground : Commons.Color.foreground
|
||||
readonly property color dim: Qt.darker(foreground, 1.55)
|
||||
readonly property color fainter: Qt.darker(foreground, 2.1)
|
||||
// A literal gold: several themes' "yellow" is not yellow.
|
||||
@@ -830,7 +831,7 @@ Panel {
|
||||
width: parent.width
|
||||
caption: root.hereLine
|
||||
// Accent while scrubbed, so a shifted time is never taken for now.
|
||||
captionColor: root.scrubMinutes !== 0 ? Color.accent : root.dim
|
||||
captionColor: root.scrubMinutes !== 0 ? Commons.Color.accent : root.dim
|
||||
captionClickable: root.focusIndex >= 0
|
||||
foreground: root.foreground
|
||||
dim: root.dim
|
||||
|
||||
@@ -4,6 +4,7 @@ import Quickshell
|
||||
import Quickshell.Io
|
||||
import qs.Ui
|
||||
import qs.Commons
|
||||
import qs.Commons as Commons
|
||||
import "Model.js" as Model
|
||||
|
||||
Panel {
|
||||
@@ -873,8 +874,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, Commons.Color.accent)
|
||||
currentFill: Style.selectedFillFor(root.bar.foreground, Commons.Color.accent)
|
||||
implicitHeight: monitorInner.implicitHeight + Style.spacing.xl
|
||||
opacity: canToggle ? 1.0 : 0.45
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import Quickshell.Io
|
||||
import Quickshell.Networking
|
||||
import qs.Ui
|
||||
import qs.Commons
|
||||
import qs.Commons as Commons
|
||||
import "Model.js" as Model
|
||||
|
||||
Panel {
|
||||
@@ -291,8 +292,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, Commons.Color.accent) : "transparent"
|
||||
readonly property color selectedFill: bar ? Style.selectedFillFor(bar.foreground, Commons.Color.accent) : "transparent"
|
||||
|
||||
// scannerEnabled lives on the shared WifiDevice, which has no reference
|
||||
// counting, and a bar widget is instantiated once per monitor. Tracking the
|
||||
@@ -2078,7 +2079,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, Commons.Color.accent)
|
||||
radius: Style.cornerRadius
|
||||
|
||||
Text {
|
||||
|
||||
@@ -3,6 +3,7 @@ import Quickshell
|
||||
import Quickshell.Io
|
||||
import Quickshell.Services.UPower
|
||||
import qs.Commons
|
||||
import qs.Commons as Commons
|
||||
import qs.Ui
|
||||
import "Model.js" as Model
|
||||
|
||||
@@ -88,7 +89,7 @@ Panel {
|
||||
}
|
||||
|
||||
readonly property color batteryFillColor: {
|
||||
return root.bar ? root.bar.foreground : Color.foreground
|
||||
return root.bar ? root.bar.foreground : Commons.Color.foreground
|
||||
}
|
||||
|
||||
// Cute agent-flavored phrases shown in the hero status line, rotated on a
|
||||
|
||||
@@ -4,6 +4,7 @@ import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import qs.Commons
|
||||
import qs.Commons as Commons
|
||||
import qs.Ui
|
||||
|
||||
Panel {
|
||||
@@ -37,8 +38,8 @@ Panel {
|
||||
]
|
||||
readonly property string heroPhraseText: activePhrases[phraseIndex % activePhrases.length]
|
||||
|
||||
readonly property color foreground: bar ? bar.foreground : Color.foreground
|
||||
readonly property color urgent: bar ? bar.urgent : Color.urgent
|
||||
readonly property color foreground: bar ? bar.foreground : Commons.Color.foreground
|
||||
readonly property color urgent: bar ? bar.urgent : Commons.Color.urgent
|
||||
readonly property color dim: Qt.darker(foreground, 1.55)
|
||||
readonly property string fontFamily: bar ? bar.fontFamily : Style.font.family
|
||||
readonly property bool showConnections: tailscale.accounts.length > 1 || tailscale.accountsAccessDenied
|
||||
@@ -54,8 +55,8 @@ Panel {
|
||||
readonly property color iconColor: tailscale.active ? foreground : dim
|
||||
readonly property string toggleHint: tailscale.active ? "Turn Tailscale off" : (tailscale.needsLogin ? "Authorize this device" : "Turn Tailscale on")
|
||||
readonly property color barIconColor: tailscale.active ? barForeground : Qt.darker(barForeground, 1.55)
|
||||
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, Commons.Color.accent) : "transparent"
|
||||
readonly property color selectedFill: bar ? Style.selectedFillFor(bar.foreground, Commons.Color.accent) : "transparent"
|
||||
|
||||
function selectedPeer() {
|
||||
if (tailscale.peers.length === 0) return null
|
||||
@@ -1035,7 +1036,7 @@ Panel {
|
||||
}
|
||||
}
|
||||
background: BorderSurface {
|
||||
color: Color.background
|
||||
color: Commons.Color.background
|
||||
borderSpec: Border.flat(root.dim, 1)
|
||||
radius: Style.cornerRadius
|
||||
}
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
import QtQuick
|
||||
import qs.Commons
|
||||
import qs.Commons as Commons
|
||||
import qs.Ui
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property real iconSize: Style.font.icon
|
||||
property color color: Color.foreground
|
||||
property color badgeColor: Color.urgent
|
||||
property color color: Commons.Color.foreground
|
||||
property color badgeColor: Commons.Color.urgent
|
||||
property bool crossed: false
|
||||
property bool warning: false
|
||||
|
||||
@@ -51,12 +52,12 @@ Item {
|
||||
color: root.badgeColor
|
||||
anchors.right: parent.right
|
||||
anchors.bottom: parent.bottom
|
||||
borderSpec: Border.flat(Color.popups.background, 1)
|
||||
borderSpec: Border.flat(Commons.Color.popups.background, 1)
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
text: "!"
|
||||
color: Color.background
|
||||
color: Commons.Color.background
|
||||
font.family: Style.font.family
|
||||
font.pixelSize: Math.max(6, parent.height * 0.72)
|
||||
font.bold: true
|
||||
|
||||
@@ -2,6 +2,7 @@ import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import qs.Commons
|
||||
import qs.Commons as Commons
|
||||
import qs.Ui
|
||||
import "Model.js" as Model
|
||||
|
||||
@@ -646,7 +647,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, Commons.Color.accent) : "transparent"
|
||||
|
||||
Text {
|
||||
textFormat: Text.PlainText
|
||||
@@ -752,7 +753,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, Commons.Color.accent) : "transparent"
|
||||
|
||||
Row {
|
||||
id: suggestionRow
|
||||
@@ -764,7 +765,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, Commons.Color.accent) : root.bar.foreground
|
||||
font.family: root.bar.fontFamily
|
||||
font.pixelSize: Style.font.body
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user