From 781ad7a5bc3f71763ec5a1da669c3b46f6966e33 Mon Sep 17 00:00:00 2001 From: Benjamin Palko Date: Fri, 29 Aug 2025 15:15:04 -0400 Subject: [PATCH 1/2] pass through border --- components/StyledIconButton.qml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/StyledIconButton.qml b/components/StyledIconButton.qml index 23319ae..f003aa7 100644 --- a/components/StyledIconButton.qml +++ b/components/StyledIconButton.qml @@ -10,6 +10,8 @@ RoundButton { source: "../assets/lucide.woff" } + property alias border: rect.border + font.family: loader.font.family font.pixelSize: 16 radius: 8 @@ -31,6 +33,7 @@ RoundButton { } background: Rectangle { + id: rect color: control.hovered ? Theme.palette.primary : Theme.palette.base100 Behavior on color { ColorAnimation { From 6b87dc80069c2fb3a257543029ac222fa62d4936 Mon Sep 17 00:00:00 2001 From: Benjamin Palko Date: Fri, 29 Aug 2025 15:19:12 -0400 Subject: [PATCH 2/2] big jive with border color, its clean af --- components/StyledIconButton.qml | 7 +++++++ modules/bar/components/Caffeine.qml | 19 ++++--------------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/components/StyledIconButton.qml b/components/StyledIconButton.qml index f003aa7..98a9662 100644 --- a/components/StyledIconButton.qml +++ b/components/StyledIconButton.qml @@ -34,6 +34,13 @@ RoundButton { background: Rectangle { id: rect + border.color: control.hovered ? Theme.palette.primary : Theme.palette.base100 + Behavior on border.color { + ColorAnimation { + duration: 100 + } + } + border.width: 2 color: control.hovered ? Theme.palette.primary : Theme.palette.base100 Behavior on color { ColorAnimation { diff --git a/modules/bar/components/Caffeine.qml b/modules/bar/components/Caffeine.qml index dd5588c..82861f9 100644 --- a/modules/bar/components/Caffeine.qml +++ b/modules/bar/components/Caffeine.qml @@ -1,26 +1,15 @@ +import qs.components import qs.config import qs.constants import qs.services -import qs.widgets -StyledButton { +StyledIconButton { id: root - border.color: Caffeine.enabled ? Theme.palette.secondary : 'transparent' - border.width: 2 + border.color: Caffeine.enabled ? Theme.palette.secondary : root.hovered ? Theme.palette.primary : Theme.palette.base100 + text: Icons.coffee onClicked: { Caffeine.toggle(); } - - content: StyledText { - id: text - - font.family: Theme.lucide.font.family - font.pixelSize: Dimensions.caffeine.fontSize - font.bold: true - text: Icons.coffee - - color: root.containsMouse ? Theme.palette.base300 : Theme.palette.basecontent - } }