diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-07-27 17:36:13 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-07-27 17:36:50 +0800 |
| commit | 60781d9d32e516694ef0d2246c620003d5db2d1f (patch) | |
| tree | 8a6206f6312a21aa002f1edc9f53500613dafaa3 /bar/Workspace.qml | |
| parent | babd026bbc5877cc93ac25c7b63870ea64f78dad (diff) | |
refactor: better color code style
Diffstat (limited to 'bar/Workspace.qml')
| -rw-r--r-- | bar/Workspace.qml | 8 |
1 files changed, 4 insertions, 4 deletions
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 {} } |
