diff --git a/assets/triangle-alert.svg b/assets/triangle-alert.svg index 9cb82a4..1a5b698 100644 --- a/assets/triangle-alert.svg +++ b/assets/triangle-alert.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/assets/triangle-dashed.svg b/assets/triangle-dashed.svg index 7f059d5..664abcf 100644 --- a/assets/triangle-dashed.svg +++ b/assets/triangle-dashed.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/assets/triangle.svg b/assets/triangle.svg index 889013f..9f7c478 100644 --- a/assets/triangle.svg +++ b/assets/triangle.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/modules/bar/components/Workspace.qml b/modules/bar/components/Workspace.qml index b28e61f..e08af3d 100644 --- a/modules/bar/components/Workspace.qml +++ b/modules/bar/components/Workspace.qml @@ -1,9 +1,7 @@ import QtQuick import QtQuick.Controls -import QtQuick.Effects import Quickshell.Hyprland import "../../../config" -import "../../../styled/" Item { id: workspace @@ -22,7 +20,7 @@ Item { radius: Dimensions.radius states: State { name: "hovered" - when: mouseArea.containsMouse + when: button.hovered PropertyChanges { rectangle { color: Theme.palette.primary @@ -41,21 +39,25 @@ Item { } } - Icon { - id: icon - - source: "/home/baobeld/dotfiles/quickshell/assets/triangle.svg" - + Button { + id: button anchors.centerIn: parent - size: Dimensions.workspace.iconSize + + verticalPadding: Dimensions.workspace.verticalPadding + horizontalPadding: Dimensions.workspace.horizontalPadding + + background: undefined + + icon.source: "/home/baobeld/dotfiles/quickshell/assets/triangle.svg" + icon.color: Theme.palette.basecontent states: State { name: "active" when: workspace.modelData.active PropertyChanges { - icon { + button { rotation: 180 - color: mouseArea.containsMouse ? Theme.palette.basecontent : Theme.palette.primary + icon.color: button.hovered ? Theme.palette.basecontent : Theme.palette.primary } } } @@ -83,7 +85,6 @@ Item { anchors.fill: parent cursorShape: Qt.PointingHandCursor - hoverEnabled: true onClicked: workspace.modelData.activate() } } diff --git a/styled/Icon.qml b/styled/Icon.qml deleted file mode 100644 index 2c19f55..0000000 --- a/styled/Icon.qml +++ /dev/null @@ -1,21 +0,0 @@ -import QtQuick -import QtQuick.Effects -import "../config/" - -Image { - id: root - - property int size: 18 - property color color: Theme.palette.basecontent - - width: size - height: size - - MultiEffect { - id: effect - source: root - anchors.fill: root - colorization: 1.0 - colorizationColor: color - } -}