summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2025-07-28 19:33:35 +0800
committerlittleblack111 <littleblack11111@gmail.com>2025-07-28 19:33:35 +0800
commitaa61a728976a53129df138e7e64431833a4fccba (patch)
tree1bb6743d23a075344fc890529e0cf3c3d3633ffa
parent1d921b13ff9bf20bc76ea5c8275360c6708a249c (diff)
refactor(colors): use background2 instead of d2, and use a proper config for transparency
-rw-r--r--bar/ActiveWindow.qml2
-rw-r--r--bar/Mpris.qml4
-rw-r--r--bar/Network.qml2
-rw-r--r--bar/Power.qml2
-rw-r--r--bar/Resources.qml2
-rw-r--r--bar/TimeDate.qml2
-rw-r--r--bar/Workspace.qml6
-rw-r--r--config/Colors.qml5
-rw-r--r--config/General.qml2
9 files changed, 16 insertions, 11 deletions
diff --git a/bar/ActiveWindow.qml b/bar/ActiveWindow.qml
index 9949917..c19e038 100644
--- a/bar/ActiveWindow.qml
+++ b/bar/ActiveWindow.qml
@@ -19,7 +19,7 @@ IRect {
implicitHeight: rowLayout.implicitHeight + General.rectMargin * 2
anchors.centerIn: parent
- color: Colors.d2
+ color: Colors.background2
// 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/Mpris.qml b/bar/Mpris.qml
index d4289ae..506232c 100644
--- a/bar/Mpris.qml
+++ b/bar/Mpris.qml
@@ -52,14 +52,14 @@ Item {
value: activePlayer?.position || 0
background: IRect {
anchors.fill: parent
- color: Colors.d2
+ color: Colors.background2
radius: Style.rounding.smaller
}
contentItem: Item {
IRect {
width: pBar.visualPosition * parent.width
height: parent.height
- color: Qt.rgba(Colors.d1.r, Colors.d1.g, Colors.d1.b, Colors.d2.a * 2)
+ color: Qt.rgba(Colors.background1.r, Colors.background1.g, Colors.background1.b, General.accentTransparency * 1.5)
radius: Style.rounding.smaller
Behavior on width {
diff --git a/bar/Network.qml b/bar/Network.qml
index c28e6d3..fcd035d 100644
--- a/bar/Network.qml
+++ b/bar/Network.qml
@@ -30,7 +30,7 @@ Item {
implicitWidth: layout.implicitWidth + General.rectMargin * 2
implicitHeight: Bar.height
- color: Colors.d2
+ color: Colors.background2
radius: Style.rounding.large
RowLayout {
diff --git a/bar/Power.qml b/bar/Power.qml
index 3681de1..cd4ab1e 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: Colors.d2
+ color: Colors.background2
radius: Style.rounding.large
RowLayout {
diff --git a/bar/Resources.qml b/bar/Resources.qml
index e1147ab..641074c 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.Colors.d2
+ color: Config.Colors.background2
radius: Config.Style.rounding.large
RowLayout {
diff --git a/bar/TimeDate.qml b/bar/TimeDate.qml
index bfc54d6..57373b2 100644
--- a/bar/TimeDate.qml
+++ b/bar/TimeDate.qml
@@ -24,7 +24,7 @@ Item {
implicitWidth: layout.width + General.rectMargin * 2
implicitHeight: Bar.height
- color: Colors.d2
+ color: Colors.background2
radius: Style.rounding.large
RowLayout {
diff --git a/bar/Workspace.qml b/bar/Workspace.qml
index f78cf1d..cd80db2 100644
--- a/bar/Workspace.qml
+++ b/bar/Workspace.qml
@@ -45,7 +45,7 @@ Item {
source: activeRect
radius: 8
cached: true
- color: root.activeOccupied ? Colors.d2 : Colors.foreground1
+ color: root.activeOccupied ? Colors.background2 : Colors.foreground1
opacity: root.activeOccupied ? Bar.wsActiveOpacity : Bar.wsEmptyOpacity / 3
Behavior on color {
@@ -68,7 +68,7 @@ Item {
implicitWidth: Bar.wsActiveIconSize
implicitHeight: Bar.wsIconSize - Bar.wsHorizontalSpacing
radius: Bar.wsRounding
- color: root.activeOccupied ? Colors.d2 : Colors.foreground1
+ color: root.activeOccupied ? Colors.background2 : Colors.foreground1
opacity: root.activeOccupied ? Bar.wsActiveOpacity : Bar.wsEmptyOpacity / 3
Behavior on x {
ISpringAnimation {}
@@ -110,7 +110,7 @@ Item {
implicitWidth: active ? Bar.wsActiveIconSize : Bar.wsIconSize
implicitHeight: Bar.wsIconSize - Bar.wsHorizontalSpacing
radius: Bar.wsRounding
- color: st.isOccupied ? Colors.d2 : Colors.foreground1
+ color: st.isOccupied ? Colors.background2 : Colors.foreground1
opacity: active && st.isOccupied ? Bar.wsActiveOpacity : st.isOccupied ? Bar.wsOpacity : Bar.wsEmptyOpacity
Icon {
diff --git a/config/Colors.qml b/config/Colors.qml
index 8caa964..4b5c6a9 100644
--- a/config/Colors.qml
+++ b/config/Colors.qml
@@ -2,9 +2,12 @@ pragma Singleton
import Quickshell
import QtQuick
+import qs.config
+
Singleton {
readonly property color background1: WallustColors.color8
- readonly property color background2: WallustColors.color0
+ // readonly property color background2: WallustColors.color0
+ readonly property color background2: Qt.rgba(WallustColors.color0.r, WallustColors.color0.g, WallustColors.color0.b, General.accentTransparency)
readonly property color background3: WallustColors.background
readonly property color a1: WallustColors.color9
readonly property color a2: WallustColors.color1
diff --git a/config/General.qml b/config/General.qml
index 0a93d33..32179e8 100644
--- a/config/General.qml
+++ b/config/General.qml
@@ -21,4 +21,6 @@ Singleton {
readonly property string animationProp: "scale"
readonly property real springAnimationSpring: 8
readonly property real springAnimationDamping: 0.4
+
+ readonly property double accentTransparency: 0.15
}