From a3931d8aec74fc84374212f9bcca76d50dc1eb82 Mon Sep 17 00:00:00 2001 From: Benjamin Palko Date: Fri, 29 Aug 2025 15:23:36 -0400 Subject: [PATCH 1/5] increase icon size --- components/StyledIconButton.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/StyledIconButton.qml b/components/StyledIconButton.qml index 98a9662..e655350 100644 --- a/components/StyledIconButton.qml +++ b/components/StyledIconButton.qml @@ -13,9 +13,9 @@ RoundButton { property alias border: rect.border font.family: loader.font.family - font.pixelSize: 16 + font.pixelSize: 18 radius: 8 - padding: 8 + padding: 6 HoverHandler { cursorShape: Qt.PointingHandCursor From 4171cc8d56688ddd8d32992485538a2299a0b00d Mon Sep 17 00:00:00 2001 From: Benjamin Palko Date: Fri, 29 Aug 2025 15:25:18 -0400 Subject: [PATCH 2/5] pywal use icon button --- modules/bar/components/Pywal.qml | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/modules/bar/components/Pywal.qml b/modules/bar/components/Pywal.qml index b21078b..d83c508 100644 --- a/modules/bar/components/Pywal.qml +++ b/modules/bar/components/Pywal.qml @@ -1,27 +1,17 @@ -import qs.config +import qs.components import qs.constants -import qs.widgets import QtQuick import Quickshell.Io -StyledButton { +StyledIconButton { id: clickable + text: Icons.brickWall + onClicked: { process.running = true; } - content: StyledText { - id: text - - font.family: Theme.lucide.font.family - font.pixelSize: Dimensions.caffeine.fontSize - font.bold: true - text: Icons.brickWall - - color: clickable.containsMouse ? Theme.palette.base300 : Theme.palette.basecontent - } - Process { id: process command: ["sh", "-c", "~/dotfiles/.scripts/pywal-swww.sh"] From 23fa99ed4c6e47b01bf24d33609eb5a93183574c Mon Sep 17 00:00:00 2001 From: Benjamin Palko Date: Fri, 29 Aug 2025 15:27:21 -0400 Subject: [PATCH 3/5] bluetooth use icon button --- modules/bar/components/bluetooth/Bluetooth.qml | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/modules/bar/components/bluetooth/Bluetooth.qml b/modules/bar/components/bluetooth/Bluetooth.qml index 80097e0..c12c93b 100644 --- a/modules/bar/components/bluetooth/Bluetooth.qml +++ b/modules/bar/components/bluetooth/Bluetooth.qml @@ -1,23 +1,13 @@ -import qs.config +import qs.components import qs.constants -import qs.widgets -StyledButton { +StyledIconButton { id: root + text: Icons.bluetooth + onClicked: popup.toggle() - content: StyledText { - id: text - - font.family: Theme.lucide.font.family - font.pixelSize: Dimensions.bluetooth.fontSize - font.bold: true - text: Icons.bluetooth - - color: root.containsMouse ? Theme.palette.base300 : Theme.palette.basecontent - } - BluetoothMenu { id: popup From 24f932f8d133e8cc323b459c2138e9d5eb5033d8 Mon Sep 17 00:00:00 2001 From: Benjamin Palko Date: Fri, 29 Aug 2025 15:32:47 -0400 Subject: [PATCH 4/5] use root reference --- modules/bar/components/hyprland/Workspace.qml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/bar/components/hyprland/Workspace.qml b/modules/bar/components/hyprland/Workspace.qml index d03298e..47270ce 100644 --- a/modules/bar/components/hyprland/Workspace.qml +++ b/modules/bar/components/hyprland/Workspace.qml @@ -1,3 +1,5 @@ +pragma ComponentBehavior: Bound + import qs.config import qs.constants import qs.widgets @@ -5,6 +7,7 @@ import QtQuick import Quickshell.Hyprland Loader { + id: root required property HyprlandWorkspace modelData active: modelData.id > 0 @@ -13,7 +16,7 @@ Loader { property Component workspace: StyledButton { id: clickable - onClicked: modelData.activate() + onClicked: root.modelData.activate() content: Text { id: icon @@ -28,7 +31,7 @@ Loader { states: [ State { name: "focused" - when: modelData.focused + when: root.modelData.focused PropertyChanges { icon { rotation: 180 @@ -38,7 +41,7 @@ Loader { }, State { name: "active" - when: modelData.active + when: root.modelData.active PropertyChanges { icon { text: Icons.triangleDashed From c5ac7fe773d989990dda1c23d8752bd71f41a6bd Mon Sep 17 00:00:00 2001 From: Benjamin Palko Date: Fri, 29 Aug 2025 15:58:28 -0400 Subject: [PATCH 5/5] pass color and rotation --- components/StyledIconButton.qml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/components/StyledIconButton.qml b/components/StyledIconButton.qml index e655350..780113d 100644 --- a/components/StyledIconButton.qml +++ b/components/StyledIconButton.qml @@ -11,6 +11,8 @@ RoundButton { } property alias border: rect.border + property color color: hovered ? Theme.palette.primarycontent : Theme.palette.basecontent + property int rotation: 0 font.family: loader.font.family font.pixelSize: 18 @@ -22,14 +24,22 @@ RoundButton { } contentItem: Text { + id: icon font: control.font text: control.text - color: control.hovered ? Theme.palette.primarycontent : Theme.palette.basecontent + color: control.color Behavior on color { ColorAnimation { duration: 100 } } + rotation: control.rotation + Behavior on rotation { + RotationAnimation { + duration: 200 + easing.type: Easing.InOutCubic + } + } } background: Rectangle {