Switched to Material3 colors principle

- works with matugen only for now
- need to restore rosepine
This commit is contained in:
quadbyte 2025-08-14 18:19:02 -04:00
parent 7fced5df95
commit 73c7ba8cdc
55 changed files with 519 additions and 583 deletions

View file

@ -36,7 +36,7 @@ Variants {
id: bar
anchors.fill: parent
color: Colors.backgroundPrimary
color: Colors.colorSurface
layer.enabled: true
}

View file

@ -51,10 +51,10 @@ NPill {
icon: root.batteryIcon()
text: Math.round(root.percent) + "%"
pillColor: Colors.surfaceVariant
iconCircleColor: Colors.accentPrimary
iconTextColor: Colors.backgroundPrimary
textColor: charging ? Colors.accentPrimary : Colors.textPrimary
pillColor: Colors.colorSurfaceVariant
iconCircleColor: Colors.colorPrimary
iconTextColor: Colors.colorSurface
textColor: charging ? Colors.colorPrimary : Colors.colorOnSurface
tooltipText: {
let lines = []

View file

@ -23,7 +23,7 @@ Row {
font.pointSize: Style.fontSizeLarge * scaling
verticalAlignment: Text.AlignVCenter
anchors.verticalCenter: parent.verticalCenter
color: Colors.accentPrimary
color: Colors.colorPrimary
}
NText {
@ -45,7 +45,7 @@ Row {
text: "thermometer"
font.family: "Material Symbols Outlined"
font.pointSize: Style.fontSizeLarge * scaling
color: Colors.accentPrimary
color: Colors.colorPrimary
verticalAlignment: Text.AlignVCenter
anchors.verticalCenter: parent.verticalCenter
}
@ -68,7 +68,7 @@ Row {
text: "memory"
font.family: "Material Symbols Outlined"
font.pointSize: Style.fontSizeLarge * scaling
color: Colors.accentPrimary
color: Colors.colorPrimary
verticalAlignment: Text.AlignVCenter
anchors.verticalCenter: parent.verticalCenter
}

View file

@ -73,8 +73,8 @@ PopupWindow {
Rectangle {
id: bg
anchors.fill: parent
color: Colors.backgroundSecondary
border.color: Colors.outline
color: Colors.colorSurface
border.color: Colors.colorOutline
border.width: Math.max(1, Style.borderThin * scaling)
radius: Style.radiusMedium * scaling
z: 0
@ -112,7 +112,7 @@ PopupWindow {
Rectangle {
id: bg
anchors.fill: parent
color: mouseArea.containsMouse ? Colors.hover : "transparent"
color: mouseArea.containsMouse ? Colors.colorTertiary : "transparent"
radius: Style.radiusSmall * scaling
visible: !(modelData?.isSeparator ?? false)
@ -126,7 +126,7 @@ PopupWindow {
id: text
Layout.fillWidth: true
color: (modelData?.enabled
?? true) ? (mouseArea.containsMouse ? Colors.textPrimary : Colors.textPrimary) : Colors.textDisabled
?? true) ? (mouseArea.containsMouse ? Colors.colorOnSurface : Colors.colorOnSurface) : Colors.textDisabled
text: modelData?.text ?? ""
font.pointSize: Style.fontSizeSmall * scaling
verticalAlignment: Text.AlignVCenter
@ -148,7 +148,7 @@ PopupWindow {
font.pointSize: Style.fontSizeSmall * scaling
verticalAlignment: Text.AlignVCenter
visible: modelData?.hasChildren ?? false
color: Colors.textPrimary
color: Colors.colorOnSurface
}
}
@ -308,8 +308,8 @@ PopupWindow {
Rectangle {
id: bg
anchors.fill: parent
color: Colors.backgroundSecondary
border.color: Colors.outline
color: Colors.colorSurface
border.color: Colors.colorOutline
border.width: Math.max(1, Style.borderThin * scaling)
radius: Style.radiusMedium * scaling
z: 0
@ -347,10 +347,10 @@ PopupWindow {
Rectangle {
id: bg
anchors.fill: parent
color: mouseArea.containsMouse ? Colors.hover : "transparent"
color: mouseArea.containsMouse ? Colors.colorTertiary : "transparent"
radius: Style.radiusSmall * scaling
visible: !(modelData?.isSeparator ?? false)
property color hoverTextColor: mouseArea.containsMouse ? Colors.textPrimary : Colors.textPrimary
property color hoverTextColor: mouseArea.containsMouse ? Colors.colorOnSurface : Colors.colorOnSurface
RowLayout {
anchors.fill: parent

View file

@ -38,8 +38,8 @@ Item {
NPill {
id: pill
icon: getIcon()
iconCircleColor: Colors.accentPrimary
collapsedIconColor: Colors.textPrimary
iconCircleColor: Colors.colorPrimary
collapsedIconColor: Colors.colorOnSurface
autoHide: true
text: Math.floor(Audio.volume * 100) + "%"
tooltipText: "Volume: " + Math.round(

View file

@ -67,9 +67,9 @@ NLoader {
Rectangle {
id: wifiMenuRect
color: Colors.backgroundSecondary
color: Colors.colorSurface
radius: Style.radiusMedium * scaling
border.color: Colors.backgroundTertiary
border.color: Colors.colorSurfaceVariant
border.width: Math.max(1, Style.borderMedium * scaling)
width: 340 * scaling
height: 320 * scaling
@ -119,14 +119,14 @@ NLoader {
text: "wifi"
font.family: "Material Symbols Outlined"
font.pointSize: Style.fontSizeXL * scaling
color: Colors.accentPrimary
color: Colors.colorPrimary
}
NText {
text: "WiFi"
font.pointSize: Style.fontSizeLarge * scaling
font.bold: true
color: Colors.textPrimary
color: Colors.colorOnSurface
Layout.fillWidth: true
}
@ -180,7 +180,7 @@ NLoader {
Layout.fillWidth: true
Layout.preferredHeight: Style.baseWidgetSize * 1.5 * scaling
radius: Style.radiusMedium * scaling
color: modelData.connected ? Colors.accentPrimary : (networkMouseArea.containsMouse ? Colors.hover : "transparent")
color: modelData.connected ? Colors.colorPrimary : (networkMouseArea.containsMouse ? Colors.colorTertiary : "transparent")
RowLayout {
anchors.fill: parent
@ -191,7 +191,7 @@ NLoader {
text: network.signalIcon(modelData.signal)
font.family: "Material Symbols Outlined"
font.pointSize: Style.fontSizeXL * scaling
color: modelData.connected ? Colors.backgroundPrimary : (networkMouseArea.containsMouse ? Colors.backgroundPrimary : Colors.textPrimary)
color: modelData.connected ? Colors.colorSurface : (networkMouseArea.containsMouse ? Colors.colorSurface : Colors.colorOnSurface)
}
ColumnLayout {
@ -204,7 +204,7 @@ NLoader {
font.pointSize: Style.fontSizeNormal * scaling
elide: Text.ElideRight
Layout.fillWidth: true
color: modelData.connected ? Colors.backgroundPrimary : (networkMouseArea.containsMouse ? Colors.backgroundPrimary : Colors.textPrimary)
color: modelData.connected ? Colors.colorSurface : (networkMouseArea.containsMouse ? Colors.colorSurface : Colors.colorOnSurface)
}
// Security Protocol
@ -213,14 +213,14 @@ NLoader {
font.pointSize: Style.fontSizeTiny * scaling
elide: Text.ElideRight
Layout.fillWidth: true
color: modelData.connected ? Colors.backgroundPrimary : (networkMouseArea.containsMouse ? Colors.backgroundPrimary : Colors.textPrimary)
color: modelData.connected ? Colors.colorSurface : (networkMouseArea.containsMouse ? Colors.colorSurface : Colors.colorOnSurface)
}
NText {
visible: network.connectStatusSsid === modelData.ssid && network.connectStatus === "error"
&& network.connectError.length > 0
text: network.connectError
color: Colors.error
color: Colors.colorError
font.pointSize: Style.fontSizeSmall * scaling
elide: Text.ElideRight
Layout.fillWidth: true
@ -236,7 +236,7 @@ NLoader {
NBusyIndicator {
visible: network.connectingSsid === modelData.ssid
running: network.connectingSsid === modelData.ssid
color: Colors.accentPrimary
color: Colors.colorPrimary
anchors.centerIn: parent
size: Style.baseWidgetSize * 0.7 * scaling
}
@ -257,7 +257,7 @@ NLoader {
text: "error"
font.family: "Material Symbols Outlined"
font.pointSize: Style.fontSizeSmall * scaling
color: Colors.error
color: Colors.colorError
anchors.centerIn: parent
}
}
@ -266,7 +266,7 @@ NLoader {
visible: modelData.connected
text: "connected"
font.pointSize: Style.fontSizeSmall * scaling
color: modelData.connected ? Colors.backgroundPrimary : (networkMouseArea.containsMouse ? Colors.backgroundPrimary : Colors.textPrimary)
color: modelData.connected ? Colors.colorSurface : (networkMouseArea.containsMouse ? Colors.colorSurface : Colors.colorOnSurface)
}
}
@ -298,7 +298,7 @@ NLoader {
Layout.preferredHeight: modelData.ssid === passwordPromptSsid && showPasswordPrompt ? 60 : 0
Layout.margins: 8
visible: modelData.ssid === passwordPromptSsid && showPasswordPrompt
color: Colors.surfaceVariant
color: Colors.colorSurfaceVariant
radius: Style.radiusSmall * scaling
RowLayout {
@ -314,7 +314,7 @@ NLoader {
anchors.fill: parent
radius: 8
color: "transparent"
border.color: passwordInputField.activeFocus ? Colors.accentPrimary : Colors.outline
border.color: passwordInputField.activeFocus ? Colors.colorPrimary : Colors.colorOutline
border.width: 1
TextInput {
@ -323,7 +323,7 @@ NLoader {
anchors.margins: Style.marginMedium * scaling
text: passwordInput
font.pointSize: Style.fontSizeMedium * scaling
color: Colors.textPrimary
color: Colors.colorOnSurface
verticalAlignment: TextInput.AlignVCenter
clip: true
focus: true
@ -350,8 +350,8 @@ NLoader {
Layout.preferredWidth: 80
Layout.preferredHeight: 36
radius: Style.radiusMedium * scaling
color: Colors.accentPrimary
border.color: Colors.accentPrimary
color: Colors.colorPrimary
border.color: Colors.colorPrimary
border.width: 0
Behavior on color {
@ -363,7 +363,7 @@ NLoader {
NText {
anchors.centerIn: parent
text: "Connect"
color: Colors.backgroundPrimary
color: Colors.colorSurface
font.pointSize: Style.fontSizeSmall * scaling
}
@ -375,8 +375,8 @@ NLoader {
}
cursorShape: Qt.PointingHandCursor
hoverEnabled: true
onEntered: parent.color = Qt.darker(Colors.accentPrimary, 1.1)
onExited: parent.color = Colors.accentPrimary
onEntered: parent.color = Qt.darker(Colors.colorPrimary, 1.1)
onExited: parent.color = Colors.colorPrimary
}
}
}

View file

@ -18,7 +18,7 @@ Item {
property ListModel localWorkspaces: ListModel {}
property real masterProgress: 0.0
property bool effectsActive: false
property color effectColor: Colors.accentPrimary
property color effectColor: Colors.colorPrimary
property int horizontalPadding: Math.round(16 * s)
property int spacingBetweenPills: Math.round(8 * s)
@ -72,7 +72,7 @@ Item {
}
function triggerUnifiedWave() {
effectColor = Colors.accentPrimary
effectColor = Colors.colorPrimary
masterAnimation.restart()
}
@ -108,7 +108,7 @@ Item {
const ws = localWorkspaces.get(i)
if (ws.isFocused === true) {
root.triggerUnifiedWave()
root.workspaceChanged(ws.id, Colors.accentPrimary)
root.workspaceChanged(ws.id, Colors.colorPrimary)
break
}
}
@ -121,14 +121,12 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
radius: Math.round(12 * s)
color: Colors.surfaceVariant
border.color: Qt.rgba(Colors.textPrimary.r, Colors.textPrimary.g, Colors.textPrimary.b, 0.1)
color: Colors.colorSurfaceVariant
border.color: Colors.colorOutlineVariant
border.width: Math.max(1, Math.round(1 * s))
layer.enabled: true
layer.effect: MultiEffect {
shadowColor: "black"
// radius: 12
shadowColor: Colors.colorShadow
shadowVerticalOffset: 0
shadowHorizontalOffset: 0
shadowOpacity: 0.10
@ -168,15 +166,15 @@ Item {
}
color: {
if (model.isFocused)
return Colors.accentPrimary
return Colors.colorPrimary
if (model.isUrgent)
return Colors.error
return Colors.colorError
if (model.isActive || model.isOccupied)
return Colors.accentTertiary
return Colors.colorSecondary
if (model.isUrgent)
return Colors.error
return Colors.colorError
return Colors.outline
return Colors.colorOutline
}
scale: model.isFocused ? 1.0 : 0.9
z: 0