diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-19 10:08:01 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-19 10:08:01 +0200 |
| commit | 5acd9d6fa93f836be88b1c75fef81d9251646e98 (patch) | |
| tree | a5e7aae81744f2c1a47f1179992fe34e3a8fa41b /desktop/Button.qml | |
| parent | b4be7d036bbe19339c3c8ab66a06ce6f0f9e9db9 (diff) | |
| download | quickshell-5acd9d6fa93f836be88b1c75fef81d9251646e98.tar.gz quickshell-5acd9d6fa93f836be88b1c75fef81d9251646e98.zip | |
feat(desktop): press feedback on the shared buttons
The hand-rolled buttons only reacted to hover, so a press gave no visual
confirmation until the action's outcome appeared. kdeconnect made this
obvious: its row buttons shell out to kdeconnect-cli, and nothing on
screen acknowledged the click.
Button.qml now fills solid accent while the mouse is held (red for
danger), with the label flipped to base for contrast. TransportButton
gets the same treatment, and the window-switcher close button lightens
on press. Toggles, tiles and tabs are left alone: their own state change
is already the feedback.
Diffstat (limited to 'desktop/Button.qml')
| -rw-r--r-- | desktop/Button.qml | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/desktop/Button.qml b/desktop/Button.qml index d6ca78f..3e0d63f 100644 --- a/desktop/Button.qml +++ b/desktop/Button.qml @@ -22,7 +22,9 @@ Rectangle { implicitHeight: label.implicitHeight + 12 radius: 7 opacity: enabled ? 1 : 0.4 - color: area.containsMouse && enabled + color: area.pressed && enabled + ? (danger ? Theme.red : Theme.accent) + : area.containsMouse && enabled ? Qt.alpha(danger ? Theme.red : Theme.accent, 0.25) : Qt.alpha(Theme.surface, 0.8) border.width: 1 @@ -32,7 +34,8 @@ Rectangle { id: label anchors.centerIn: parent font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 2 } - color: danger ? Theme.red : Theme.text + color: (area.pressed && btn.enabled) ? Theme.base + : danger ? Theme.red : Theme.text } MouseArea { |
