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
@@ -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
|
||||
|
||||
Reference in new issue
Block a user