diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-07-13 22:44:02 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-07-13 22:44:02 +0800 |
| commit | 03a93a60a6c425f5e881bed01feddf7f755624a7 (patch) | |
| tree | 5676a78966af4036a2c4a7374687d58b864e23df /bar/Workspace.qml | |
| parent | 6487f0a1778efc94f192326c1048f3d05d1b408f (diff) | |
refactor: icons -> icon components
Diffstat (limited to 'bar/Workspace.qml')
| -rw-r--r-- | bar/Workspace.qml | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/bar/Workspace.qml b/bar/Workspace.qml index cf8e482..50b9296 100644 --- a/bar/Workspace.qml +++ b/bar/Workspace.qml @@ -3,7 +3,7 @@ import QtQuick import Quickshell import Quickshell.Hyprland import Quickshell.Wayland -import qs.config as Config +import qs.config import qs.components Item { @@ -31,29 +31,29 @@ Item { implicitWidth: childrenRect.width anchors.verticalCenter: parent.verticalCenter - spacing: Config.Bar.workspaceSpacing + spacing: Bar.workspaceSpacing Repeater { - model: Config.Bar.workspaces + model: Bar.workspaces Rectangle { id: workspaceRect property var st: getWorkspaceStats(index) - implicitWidth: !st.isActive ? Config.Bar.workspaceIconSize : Config.Bar.workspaceActiveIconSize - implicitHeight: Config.Bar.workspaceIconSize - Config.Bar.workspaceHorizontalSpacing - radius: Config.Bar.workspaceRounding - Icons { + implicitWidth: !st.isActive ? Bar.workspaceIconSize : Bar.workspaceActiveIconSize + implicitHeight: Bar.workspaceIconSize - Bar.workspaceHorizontalSpacing + radius: Bar.workspaceRounding + Icon { anchors.centerIn: parent - text: !st.isUrgent ? Config.Icons.ws[index + 1] : Config.Icons.ws['urgent'] // TODO: urgent = red - font.pixelSize: Config.Bar.workspaceIconSize / 2 - color: Config.Colors.foreground // TODO make IText w/ ts default color + text: !st.isUrgent ? Icons.ws[index + 1] : Icons.ws['urgent'] // TODO: urgent = red + font.pixelSize: Bar.workspaceIconSize / 2 + color: Colors.foreground // TODO make IText w/ ts default color opacity: !st.isOccupied ? 0 : 1 // less contrast - // opacity: isActive(index) ? Config.Bar.workspaceActiveOpacity : isOccupied(index) ? Config.Bar.workspaceOpacity : Config.Bar.workspaceEmptyOpacity + // opacity: isActive(index) ? Bar.workspaceActiveOpacity : isOccupied(index) ? Bar.workspaceOpacity : Bar.workspaceEmptyOpacity } - color: st.isOccupied ? Config.Colors.alt : Config.Colors.foreground - opacity: st.isActive && st.isOccupied ? Config.Bar.workspaceActiveOpacity : st.isOccupied ? Config.Bar.workspaceOpacity : Config.Bar.workspaceEmptyOpacity + color: st.isOccupied ? Colors.alt : Colors.foreground + opacity: st.isActive && st.isOccupied ? Bar.workspaceActiveOpacity : st.isOccupied ? Bar.workspaceOpacity : Bar.workspaceEmptyOpacity } } } |
