diff --git a/shell/modules/bar/Bar.qml b/shell/modules/bar/Bar.qml index cbc1717..e3de268 100644 --- a/shell/modules/bar/Bar.qml +++ b/shell/modules/bar/Bar.qml @@ -1,7 +1,7 @@ import QtQuick import Quickshell import "components" -import "../../config" +import "../../config/" Scope { PanelWindow { @@ -13,13 +13,14 @@ Scope { right: true } - implicitHeight: 30 + implicitHeight: 40 color: 'transparent' Rectangle { + id: background anchors.fill: parent - color: Colours.palette.base100 + color: Theme.palette.base300 } Row { diff --git a/shell/modules/bar/components/Workspace.qml b/shell/modules/bar/components/Workspace.qml new file mode 100644 index 0000000..3319258 --- /dev/null +++ b/shell/modules/bar/components/Workspace.qml @@ -0,0 +1,38 @@ +import QtQuick +import QtQuick.Controls +import Quickshell.Hyprland +import "../../../config" + +Item { + id: workspace + + required property HyprlandWorkspace modelData + + visible: modelData.id > 0 + + width: 30 + height: 30 + + Button { + id: button + anchors.centerIn: parent + + padding: 6 + leftPadding: 7 + rightPadding: 7 + + background: Rectangle { + id: rectangle + anchors.fill: parent + color: "#161212" + radius: 8 + } + + rotation: workspace.modelData.active ? 0 : 180 + + icon.source: "/home/baobeld/dotfiles/quickshell/shell/assets/triangle.svg" + icon.color: workspace.modelData.active ? Theme.palette.primary : Theme.palette.basecontent + + onClicked: workspace.modelData.activate() + } +} diff --git a/shell/modules/bar/components/Workspaces.qml b/shell/modules/bar/components/Workspaces.qml index 4a69735..ceef72b 100644 --- a/shell/modules/bar/components/Workspaces.qml +++ b/shell/modules/bar/components/Workspaces.qml @@ -1,8 +1,6 @@ import QtQuick import QtQuick.Controls -import QtQuick.VectorImage import Quickshell.Hyprland -import "../../../config" Row { id: root @@ -13,39 +11,6 @@ Row { model: Hyprland.workspaces - Item { - id: workspace - - required property HyprlandWorkspace modelData - - visible: modelData.id > 0 - - width: 25 - height: 25 - - Rectangle { - id: rectangle - - anchors.verticalCenter: parent.verticalCenter - anchors.fill: parent - color: "#161212" - radius: 8 - } - - Button { - id: button - anchors.centerIn: parent - anchors.fill: parent - - rotation: workspace.modelData.active ? 0 : 180 - - icon.source: "/home/baobeld/dotfiles/quickshell/shell/assets/triangle.svg" - icon.color: "#1fb854" - - // palette.button: QtColor. - - onClicked: workspace.modelData.activate() - } - } + Workspace {} } }