summaryrefslogtreecommitdiff
path: root/bar
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2025-07-27 17:36:13 +0800
committerlittleblack111 <littleblack11111@gmail.com>2025-07-27 17:36:50 +0800
commit60781d9d32e516694ef0d2246c620003d5db2d1f (patch)
tree8a6206f6312a21aa002f1edc9f53500613dafaa3 /bar
parentbabd026bbc5877cc93ac25c7b63870ea64f78dad (diff)
refactor: better color code style
Diffstat (limited to 'bar')
-rw-r--r--bar/ActiveWindow.qml2
-rw-r--r--bar/Bar.qml4
-rw-r--r--bar/Mpris.qml8
-rw-r--r--bar/Network.qml10
-rw-r--r--bar/Power.qml2
-rw-r--r--bar/Resources.qml2
-rw-r--r--bar/TimeDate.qml2
-rw-r--r--bar/Workspace.qml8
8 files changed, 19 insertions, 19 deletions
diff --git a/bar/ActiveWindow.qml b/bar/ActiveWindow.qml
index c5cd117..9949917 100644
--- a/bar/ActiveWindow.qml
+++ b/bar/ActiveWindow.qml
@@ -19,7 +19,7 @@ IRect {
implicitHeight: rowLayout.implicitHeight + General.rectMargin * 2
anchors.centerIn: parent
- color: WallustColors.color4
+ color: Colors.d2
// according to docs, null could happen but doesn't seem to happen in practice so..
// hypr toplevel.activated is always true and doesn't change either so..
opacity: activated ? 1 : 0
diff --git a/bar/Bar.qml b/bar/Bar.qml
index 87ab667..b7335e2 100644
--- a/bar/Bar.qml
+++ b/bar/Bar.qml
@@ -43,7 +43,7 @@ Scope {
anchors.left: parent.left
width: leftRow.width + leftRow.anchors.leftMargin - leftSpacer.width
height: leftRow.height
- color: Qt.rgba(WallustColors.background.r, WallustColors.background.g, WallustColors.background.b, Bar.bgTransparency)
+ color: Qt.rgba(Colors.background3.r, Colors.background3.g, Colors.background3.b, Bar.bgTransparency)
radius: Bar.moduleRadius
Behavior on color {
@@ -92,7 +92,7 @@ Scope {
anchors.right: parent.right
width: rightRow.width + rightRow.anchors.rightMargin - rightSpacer.width
height: rightRow.height
- color: Qt.rgba(WallustColors.background.r, WallustColors.background.g, WallustColors.background.b, Bar.bgTransparency)
+ color: Qt.rgba(Colors.background3.r, Colors.background3.g, Colors.background3.b, Bar.bgTransparency)
radius: Bar.moduleRadius
Behavior on color {
diff --git a/bar/Mpris.qml b/bar/Mpris.qml
index 3f388b4..23c7c2f 100644
--- a/bar/Mpris.qml
+++ b/bar/Mpris.qml
@@ -52,14 +52,14 @@ Item {
value: activePlayer?.position || 0
background: IRect {
anchors.fill: parent
- color: WallustColors.color4
+ color: Colors.d2
radius: Style.rounding.smaller
}
contentItem: Item {
IRect {
width: pBar.visualPosition * parent.width
height: parent.height
- color: Qt.rgba(WallustColors.color12.r, WallustColors.color12.g, WallustColors.color12.b, WallustColors.color4.a * 2)
+ color: Qt.rgba(Colors.d1.r, Colors.d1.g, Colors.d1.b, Colors.d2.a * 2)
radius: Style.rounding.smaller
Behavior on width {
@@ -109,7 +109,7 @@ Item {
source: image
opacity: activePlayer?.playbackState === MprisPlaybackState.Playing ? 1 : Bar.mediaPausedOpacity
radius: 6
- color: WallustColors.background
+ color: Colors.background3
Behavior on opacity {
NumberAnimation {
@@ -143,7 +143,7 @@ Item {
IText {
animate: true
opacity: activePlayer?.playbackState === MprisPlaybackState.Playing ? 1 : Bar.mediaPausedOpacity
- color: activePlayer?.playbackState === MprisPlaybackState.Playing ? WallustColors.foreground : WallustColors.color15
+ color: activePlayer?.playbackState === MprisPlaybackState.Playing ? Colors.foreground1 : Colors.foreground2
text: root.cleanedTitle
Behavior on opacity {
diff --git a/bar/Network.qml b/bar/Network.qml
index f4178f2..6ce9f67 100644
--- a/bar/Network.qml
+++ b/bar/Network.qml
@@ -30,7 +30,7 @@ Item {
implicitWidth: layout.implicitWidth + General.rectMargin * 2
implicitHeight: Bar.height
- color: WallustColors.color4
+ color: Colors.d2
radius: Style.rounding.large
RowLayout {
@@ -58,24 +58,24 @@ Item {
spacing: Bar.resourceIconTextSpacing / 2
Icon {
text: Icons.resource.network.download
- color: root.downUnit == root.usageUnit && root.down > root.significantUsage ? Colors.cyan : WallustColors.color15
+ color: root.downUnit == root.usageUnit && root.down > root.significantUsage ? Colors.cyan : Colors.foreground2
}
IText {
animate: true
text: root.down + root.downUnit
- color: root.downUnit == root.usageUnit && root.down > root.significantUsage ? Colors.cyan : WallustColors.color15
+ color: root.downUnit == root.usageUnit && root.down > root.significantUsage ? Colors.cyan : Colors.foreground2
}
}
RowLayout {
spacing: Bar.resourceIconTextSpacing / 2
Icon {
text: Icons.resource.network.upload
- color: root.upUnit == root.usageUnit && root.up > root.significantUsage ? Colors.cyan : WallustColors.color15
+ color: root.upUnit == root.usageUnit && root.up > root.significantUsage ? Colors.cyan : Colors.foreground2
}
IText {
animate: true
text: root.up + root.upUnit
- color: root.upUnit == root.usageUnit && root.up > root.significantUsage ? Colors.cyan : WallustColors.color15
+ color: root.upUnit == root.usageUnit && root.up > root.significantUsage ? Colors.cyan : Colors.foreground2
}
}
diff --git a/bar/Power.qml b/bar/Power.qml
index 089fb0e..3681de1 100644
--- a/bar/Power.qml
+++ b/bar/Power.qml
@@ -26,7 +26,7 @@ Item {
implicitWidth: layout.implicitWidth + General.rectMargin * 2
implicitHeight: Bar.height - General.rectMargin
- color: WallustColors.color4
+ color: Colors.d2
radius: Style.rounding.large
RowLayout {
diff --git a/bar/Resources.qml b/bar/Resources.qml
index 548698f..e1147ab 100644
--- a/bar/Resources.qml
+++ b/bar/Resources.qml
@@ -14,7 +14,7 @@ Item {
implicitWidth: layout.implicitWidth + Config.General.rectMargin * 2
implicitHeight: Config.Bar.height - Config.General.rectMargin
- color: Config.WallustColors.color4
+ color: Config.Colors.d2
radius: Config.Style.rounding.large
RowLayout {
diff --git a/bar/TimeDate.qml b/bar/TimeDate.qml
index ede12ee..4908f6d 100644
--- a/bar/TimeDate.qml
+++ b/bar/TimeDate.qml
@@ -24,7 +24,7 @@ Item {
implicitWidth: layout.width + General.rectMargin * 2
implicitHeight: Bar.height
- color: WallustColors.color4
+ color: Colors.d2
radius: Style.rounding.large
RowLayout {
diff --git a/bar/Workspace.qml b/bar/Workspace.qml
index f709478..ee6810b 100644
--- a/bar/Workspace.qml
+++ b/bar/Workspace.qml
@@ -37,7 +37,7 @@ Item {
source: activeRect
radius: 8
cached: true
- color: root.activeOccupied ? WallustColors.color4 : WallustColors.foreground
+ color: root.activeOccupied ? Colors.d2 : Colors.foreground1
opacity: root.activeOccupied ? Bar.wsActiveOpacity : Bar.wsEmptyOpacity / 3
Behavior on color {
@@ -60,7 +60,7 @@ Item {
implicitWidth: Bar.wsActiveIconSize
implicitHeight: Bar.wsIconSize - Bar.wsHorizontalSpacing
radius: Bar.wsRounding
- color: root.activeOccupied ? WallustColors.color4 : WallustColors.foreground
+ color: root.activeOccupied ? Colors.d2 : Colors.foreground1
opacity: root.activeOccupied ? Bar.wsActiveOpacity : Bar.wsEmptyOpacity / 3
Behavior on x {
ISpringAnimation {}
@@ -102,7 +102,7 @@ Item {
implicitWidth: active ? Bar.wsActiveIconSize : Bar.wsIconSize
implicitHeight: Bar.wsIconSize - Bar.wsHorizontalSpacing
radius: Bar.wsRounding
- color: st.isOccupied ? WallustColors.color4 : WallustColors.foreground
+ color: st.isOccupied ? Colors.d2 : Colors.foreground1
opacity: active && st.isOccupied ? Bar.wsActiveOpacity : st.isOccupied ? Bar.wsOpacity : Bar.wsEmptyOpacity
Icon {
@@ -110,7 +110,7 @@ Item {
text: !st.isUrgent ? Icons.ws[index + 1] : Icons.ws['urgent']
font.pixelSize: !active ? Bar.wsIconSize / 2 : Bar.wsActiveIconSize / 2.5
opacity: !st.isOccupied ? 0 : 1
- color: !st.isUrgent ? !st.isActive ? WallustColors.color15 : WallustColors.foreground : Colors.red
+ color: !st.isUrgent ? !st.isActive ? Colors.foreground2 : Colors.foreground1 : Colors.red
Behavior on font.pixelSize {
ISpringAnimation {}
}