From cbcb8cf8e13e6c8d03c769007e9f9c32e4f7eb22 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Tue, 11 Nov 2025 00:01:57 +0100 Subject: [PATCH] wbar: more interactions --- dots/.config/quickshell/ii/modules/waffle/bar/BarButton.qml | 4 ++-- .../quickshell/ii/modules/waffle/bar/TaskViewButton.qml | 6 ++++++ .../.config/quickshell/ii/modules/waffle/bar/TimeButton.qml | 6 ++++++ dots/.config/quickshell/ii/modules/waffle/bar/WaffleBar.qml | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/dots/.config/quickshell/ii/modules/waffle/bar/BarButton.qml b/dots/.config/quickshell/ii/modules/waffle/bar/BarButton.qml index 1ea789fcb..20929b1e6 100644 --- a/dots/.config/quickshell/ii/modules/waffle/bar/BarButton.qml +++ b/dots/.config/quickshell/ii/modules/waffle/bar/BarButton.qml @@ -12,7 +12,7 @@ Button { topInset: 4 bottomInset: 4 - property color borderColor: ColorUtils.transparentize(Looks.colors.bg1Border, (root.hovered && !root.down) ? Looks.fluentContentTransparency : 1) + property color borderColor: ColorUtils.transparentize(Looks.colors.bg1Border, ((root.hovered && !root.down) || root.checked) ? Looks.fluentContentTransparency : 1) Behavior on borderColor { animation: Looks.transition.color.createObject(this) } @@ -25,7 +25,7 @@ Button { color: { if (root.down) { return Looks.colors.bg1Active - } else if (root.hovered) { + } else if ((root.hovered && !root.down) || root.checked) { return Looks.colors.bg1Hover } else { return ColorUtils.transparentize(Looks.colors.bg1) diff --git a/dots/.config/quickshell/ii/modules/waffle/bar/TaskViewButton.qml b/dots/.config/quickshell/ii/modules/waffle/bar/TaskViewButton.qml index 3211217fa..1239fed6f 100644 --- a/dots/.config/quickshell/ii/modules/waffle/bar/TaskViewButton.qml +++ b/dots/.config/quickshell/ii/modules/waffle/bar/TaskViewButton.qml @@ -1,6 +1,7 @@ import QtQuick import QtQuick.Layouts import org.kde.kirigami as Kirigami +import qs import qs.services import qs.modules.common import qs.modules.waffle.looks @@ -9,4 +10,9 @@ AppButton { id: root iconName: "task-view" + + checked: GlobalStates.overviewOpen + onClicked: { + GlobalStates.overviewOpen = !GlobalStates.overviewOpen; + } } diff --git a/dots/.config/quickshell/ii/modules/waffle/bar/TimeButton.qml b/dots/.config/quickshell/ii/modules/waffle/bar/TimeButton.qml index 53177da12..f8e2f38cc 100644 --- a/dots/.config/quickshell/ii/modules/waffle/bar/TimeButton.qml +++ b/dots/.config/quickshell/ii/modules/waffle/bar/TimeButton.qml @@ -1,5 +1,6 @@ import QtQuick import QtQuick.Layouts +import qs import qs.services import qs.modules.common import qs.modules.waffle.looks @@ -10,6 +11,11 @@ BarButton { rightInset: 12 // For now this is the rightmost button. Desktop peek is useless. (for now) padding: 12 + checked: GlobalStates.sidebarRightOpen + onClicked: { + GlobalStates.sidebarRightOpen = !GlobalStates.sidebarRightOpen; + } + contentItem: Item { anchors.centerIn: root.background implicitHeight: column.implicitHeight diff --git a/dots/.config/quickshell/ii/modules/waffle/bar/WaffleBar.qml b/dots/.config/quickshell/ii/modules/waffle/bar/WaffleBar.qml index 241b5e66b..5c19c661f 100644 --- a/dots/.config/quickshell/ii/modules/waffle/bar/WaffleBar.qml +++ b/dots/.config/quickshell/ii/modules/waffle/bar/WaffleBar.qml @@ -23,7 +23,7 @@ Scope { screen: modelData exclusionMode: ExclusionMode.Ignore exclusiveZone: implicitHeight - WlrLayershell.namespace: "quickshell:wbar" + WlrLayershell.namespace: "quickshell:wBar" anchors { left: true