Renamed Colors to Color

- some work on the active window
This commit is contained in:
quadbyte 2025-08-16 22:39:11 -04:00
parent ffd9ee8efe
commit 4fcdb1543d
60 changed files with 491 additions and 455 deletions

View file

@ -11,9 +11,9 @@ Rectangle {
implicitWidth: childrenRect.width
implicitHeight: childrenRect.height
color: Colors.mSurfaceVariant
color: Color.mSurfaceVariant
radius: Style.radiusMedium * scaling
border.color: Colors.mOutlineVariant
border.color: Color.mOutlineVariant
border.width: Math.max(1, Style.borderThin * scaling)
clip: true
}

View file

@ -6,7 +6,7 @@ Item {
id: root
property bool running: true
property color color: Colors.mPrimary
property color color: Color.mPrimary
property int size: Style.baseWidgetSize * scaling
property int strokeWidth: Style.borderThick * scaling
property int duration: 1000

View file

@ -9,8 +9,8 @@ Rectangle {
implicitWidth: childrenRect.width
implicitHeight: childrenRect.height
color: Colors.mSurface
color: Color.mSurface
radius: Style.radiusMedium * scaling
border.color: Colors.mOutline
border.color: Color.mOutline
border.width: Math.max(1, Style.borderThin * scaling)
}

View file

@ -18,9 +18,9 @@ Rectangle {
width: 68 * scaling
height: 92 * scaling
color: flat ? "transparent" : Colors.mSurface
color: flat ? "transparent" : Color.mSurface
radius: Style.radiusSmall * scaling
border.color: flat ? "transparent" : Colors.mSurfaceVariant
border.color: flat ? "transparent" : Color.mSurfaceVariant
border.width: flat ? 0 : Math.max(1, Style.borderThin * scaling)
clip: true
@ -58,14 +58,14 @@ Rectangle {
ctx.reset()
ctx.lineWidth = 6 * scaling * contentScale
// Track uses surfaceVariant for stronger contrast
ctx.strokeStyle = Colors.mSurface
ctx.strokeStyle = Color.mSurface
ctx.beginPath()
ctx.arc(cx, cy, r, start, endBg)
ctx.stroke()
// Value arc
const ratio = Math.max(0, Math.min(1, root.value / 100))
const end = start + (endBg - start) * ratio
ctx.strokeStyle = Colors.mPrimary
ctx.strokeStyle = Color.mPrimary
ctx.beginPath()
ctx.arc(cx, cy, r, start, end)
ctx.stroke()
@ -79,7 +79,7 @@ Rectangle {
text: `${root.value}${root.suffix}`
font.pointSize: Style.fontSizeMedium * scaling * contentScale
font.weight: Style.fontWeightBold
color: Colors.mOnSurface
color: Color.mOnSurface
horizontalAlignment: Text.AlignHCenter
}
@ -89,8 +89,8 @@ Rectangle {
width: 28 * scaling * contentScale
height: width
radius: width / 2
color: Colors.mSurface
// border.color: Colors.mPrimary
color: Color.mSurface
// border.color: Color.mPrimary
// border.width: Math.max(1, Style.borderThin * scaling)
anchors.right: parent.right
anchors.top: parent.top
@ -102,7 +102,7 @@ Rectangle {
text: root.icon
font.family: "Material Symbols Outlined"
font.pointSize: Style.fontSizeLargeXL * scaling * contentScale
color: Colors.mOnSurface
color: Color.mOnSurface
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}

View file

@ -29,12 +29,12 @@ ColumnLayout {
text: label
font.pointSize: Style.fontSizeMedium * scaling
font.weight: Style.fontWeightBold
color: Colors.mOnSurface
color: Color.mOnSurface
}
NText {
text: description
font.pointSize: Style.fontSizeSmall * scaling
color: Colors.mOnSurface
color: Color.mOnSurface
wrapMode: Text.WordWrap
}
}
@ -61,8 +61,8 @@ ColumnLayout {
background: Rectangle {
implicitWidth: Style.baseWidgetSize * 3.75 * scaling
implicitHeight: preferredHeight
color: Colors.mSurface
border.color: combo.activeFocus ? Colors.mTertiary : Colors.mOutline
color: Color.mSurface
border.color: combo.activeFocus ? Color.mTertiary : Color.mOutline
border.width: Math.max(1, Style.borderThin * scaling)
radius: Style.radiusMedium * scaling
}
@ -118,22 +118,22 @@ ColumnLayout {
contentItem: NText {
text: name
font.pointSize: Style.fontSizeMedium * scaling
color: highlighted ? Colors.mSurface : Colors.mOnSurface
color: highlighted ? Color.mSurface : Color.mOnSurface
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
}
background: Rectangle {
width: combo.width - Style.marginMedium * scaling * 3
color: highlighted ? Colors.mTertiary : "transparent"
color: highlighted ? Color.mTertiary : "transparent"
radius: Style.radiusSmall * scaling
}
}
}
background: Rectangle {
color: Colors.mSurfaceVariant
border.color: Colors.mOutline
color: Color.mSurfaceVariant
border.color: Color.mOutline
border.width: Math.max(1, Style.borderThin * scaling)
radius: Style.radiusMedium * scaling
}

View file

@ -7,5 +7,5 @@ import qs.Services
Rectangle {
width: parent.width
height: Math.max(1, Style.borderThin * scaling)
color: Colors.mOutline
color: Color.mOutline
}

View file

@ -26,9 +26,9 @@ Rectangle {
implicitWidth: size
implicitHeight: size
color: (root.hovering || showFilled) ? Colors.mPrimary : "transparent"
color: (root.hovering || showFilled) ? Color.mPrimary : "transparent"
radius: width * 0.5
border.color: showBorder ? Colors.mPrimary : "transparent"
border.color: showBorder ? Color.mPrimary : "transparent"
border.width: Math.max(1, Style.borderThin * scaling)
NText {
@ -42,7 +42,7 @@ Rectangle {
font.variableAxes: {
"wght": (Font.Normal + Font.Bold) / 2.0
}
color: (root.hovering || showFilled) ? Colors.mOnPrimary : showBorder ? Colors.mPrimary : Colors.mOnSurface
color: (root.hovering || showFilled) ? Color.mOnPrimary : showBorder ? Color.mPrimary : Color.mOnSurface
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
opacity: root.enabled ? Style.opacityFull : Style.opacityMedium

View file

@ -11,7 +11,7 @@ PanelWindow {
property bool showOverlay: Settings.data.general.dimDesktop
property int topMargin: Style.barHeight * scaling
property color overlayColor: showOverlay ? Colors.applyOpacity(Colors.mShadow, "AA") : "transparent"
property color overlayColor: showOverlay ? Color.applyOpacity(Color.mShadow, "AA") : "transparent"
signal dismissed
function hide() {

View file

@ -9,11 +9,11 @@ Item {
property string icon: ""
property string text: ""
property string tooltipText: ""
property color pillColor: Colors.mSurfaceVariant
property color textColor: Colors.mOnSurface
property color iconCircleColor: Colors.mPrimary
property color iconTextColor: Colors.mSurface
property color collapsedIconColor: Colors.mOnSurface
property color pillColor: Color.mSurfaceVariant
property color textColor: Color.mOnSurface
property color iconCircleColor: Color.mPrimary
property color iconTextColor: Color.mSurface
property color collapsedIconColor: Color.mOnSurface
property real sizeMultiplier: 0.8
property bool autoHide: false

View file

@ -14,7 +14,7 @@ RadioButton {
implicitHeight: Style.baseWidgetSize * 0.625 * scaling
radius: width * 0.5
color: "transparent"
border.color: root.checked ? Colors.mPrimary : Colors.mOnSurface
border.color: root.checked ? Color.mPrimary : Color.mOnSurface
border.width: Math.max(1, Style.borderMedium * scaling)
anchors.verticalCenter: parent.verticalCenter
@ -24,7 +24,7 @@ RadioButton {
implicitHeight: Style.marginSmall * scaling
radius: width * 0.5
color: Qt.alpha(Colors.mPrimary, root.checked ? 1 : 0)
color: Qt.alpha(Color.mPrimary, root.checked ? 1 : 0)
}
Behavior on border.color {

View file

@ -26,13 +26,13 @@ Slider {
width: root.availableWidth
height: implicitHeight
radius: height / 2
color: Colors.mSurface
color: Color.mSurface
Rectangle {
id: activeTrack
width: root.visualPosition * parent.width
height: parent.height
color: Colors.mPrimary
color: Color.mPrimary
radius: parent.radius
}
@ -42,7 +42,7 @@ Slider {
width: knobDiameter + cutoutExtra
height: knobDiameter + cutoutExtra
radius: width / 2
color: root.cutoutColor !== undefined ? root.cutoutColor : Colors.mSurface
color: root.cutoutColor !== undefined ? root.cutoutColor : Color.mSurface
x: Math.max(0, Math.min(parent.width - width,
root.visualPosition * (parent.width - root.knobDiameter) - cutoutExtra / 2))
y: (parent.height - height) / 2
@ -60,7 +60,7 @@ Slider {
anchors.fill: knob
source: knob
shadowEnabled: true
shadowColor: Colors.mShadow
shadowColor: Color.mShadow
shadowOpacity: 0.25
shadowHorizontalOffset: 0
shadowVerticalOffset: 1
@ -72,8 +72,8 @@ Slider {
implicitWidth: knobDiameter
implicitHeight: knobDiameter
radius: width * 0.5
color: root.pressed ? Colors.mSurfaceVariant : Colors.mSurface
border.color: Colors.mPrimary
color: root.pressed ? Color.mSurfaceVariant : Color.mSurface
border.color: Color.mPrimary
border.width: Math.max(1, Style.borderThick * scaling)
// Press feedback halo (using accent color, low opacity)
@ -82,7 +82,7 @@ Slider {
width: parent.width + 8 * scaling
height: parent.height + 8 * scaling
radius: width / 2
color: Colors.mPrimary
color: Color.mPrimary
opacity: root.pressed ? 0.16 : 0.0
}
}

View file

@ -9,5 +9,5 @@ Text {
font.family: Settings.data.ui.fontFamily
font.pointSize: Style.fontSizeMedium * scaling
font.weight: Style.fontWeightRegular
color: Colors.mOnSurface
color: Color.mOnSurface
}

View file

@ -29,13 +29,13 @@ Item {
text: label
font.pointSize: Style.fontSizeMedium * scaling
font.weight: Style.fontWeightBold
color: Colors.mOnSurface
color: Color.mOnSurface
}
NText {
text: description
font.pointSize: Style.fontSizeSmall * scaling
color: Colors.mOnSurface
color: Color.mOnSurface
wrapMode: Text.WordWrap
Layout.fillWidth: true
}
@ -47,8 +47,8 @@ Item {
implicitWidth: root.width
implicitHeight: Style.baseWidgetSize * 1.35 * scaling
radius: Style.radiusMedium * scaling
color: Colors.mSurface
border.color: Colors.mOutline
color: Color.mSurface
border.color: Color.mOutline
border.width: Math.max(1, Style.borderThin * scaling)
// Focus ring
@ -56,7 +56,7 @@ Item {
anchors.fill: parent
radius: frame.radius
color: "transparent"
border.color: input.activeFocus ? Colors.mTertiary : "transparent"
border.color: input.activeFocus ? Color.mTertiary : "transparent"
border.width: input.activeFocus ? Math.max(1, Style.borderThin * scaling) : 0
}
@ -74,8 +74,8 @@ Item {
echoMode: TextInput.Normal
readOnly: root.readOnly
enabled: root.enabled
color: Colors.mOnSurface
placeholderTextColor: Colors.mOnSurface
color: Color.mOnSurface
placeholderTextColor: Color.mOnSurface
background: null
font.pointSize: Style.fontSizeSmall * scaling
onEditingFinished: root.editingFinished()

View file

@ -27,13 +27,13 @@ RowLayout {
text: label
font.pointSize: Style.fontSizeMedium * scaling
font.weight: Style.fontWeightBold
color: Colors.mOnSurface
color: Color.mOnSurface
}
NText {
text: description
font.pointSize: Style.fontSizeSmall * scaling
color: Colors.mOnSurface
color: Color.mOnSurface
wrapMode: Text.WordWrap
Layout.fillWidth: true
}
@ -45,16 +45,16 @@ RowLayout {
implicitWidth: root.baseSize * 1.625 * scaling
implicitHeight: root.baseSize * scaling
radius: height * 0.5
color: root.checked ? Colors.mPrimary : Colors.mSurface
border.color: root.checked ? Colors.mPrimary : Colors.mOutline
color: root.checked ? Color.mPrimary : Color.mSurface
border.color: root.checked ? Color.mPrimary : Color.mOutline
border.width: Math.max(1, Style.borderMedium * scaling)
Rectangle {
implicitWidth: (root.baseSize - 5) * scaling
implicitHeight: (root.baseSize - 5) * scaling
radius: height * 0.5
color: root.checked ? Colors.mOnPrimary : Colors.mPrimary
border.color: root.checked ? Colors.mSurface : Colors.mSurface
color: root.checked ? Color.mOnPrimary : Color.mPrimary
border.color: root.checked ? Color.mSurface : Color.mSurface
border.width: Math.max(1, Style.borderMedium * scaling)
y: 2 * scaling
x: root.checked ? switcher.width - width - 2 * scaling : 2 * scaling

View file

@ -135,8 +135,8 @@ Window {
id: tooltipRect
anchors.fill: parent
radius: Style.radiusMedium * scaling
color: Colors.mSurface
border.color: Colors.mOutline
color: Color.mSurface
border.color: Color.mOutline
border.width: Math.max(1, Style.borderThin * scaling)
z: 1