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

@@ -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
}