aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/Settings.qml
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-12-04 11:32:57 +0100
committerDanilo M. <danix@danix.xyz>2026-12-04 11:32:57 +0100
commit2830b2c1dd5ebe8ebcb5a48816479eff0b0950f6 (patch)
treec51da477b588244574df088571b6d3b6e97adf2c /desktop/Settings.qml
parent1a5c04780f7ec7ab1055cd4594aae3e6374fedd0 (diff)
downloadquickshell-2830b2c1dd5ebe8ebcb5a48816479eff0b0950f6.tar.gz
quickshell-2830b2c1dd5ebe8ebcb5a48816479eff0b0950f6.zip
refactor: WindowButton, Keystone's round titlebar button
Shared so the assistant card's titlebar looks the same. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/Settings.qml')
-rw-r--r--desktop/Settings.qml39
1 files changed, 10 insertions, 29 deletions
diff --git a/desktop/Settings.qml b/desktop/Settings.qml
index 56f911f..0fe9ab6 100644
--- a/desktop/Settings.qml
+++ b/desktop/Settings.qml
@@ -120,35 +120,16 @@ Scope {
height: 28
spacing: 6
- Repeater {
- // nf-fa-compress / nf-fa-expand and nf-fa-xmark, present
- // in Inconsolata Nerd Font.
- model: [
- { icon: win.maximized ? "\uf066" : "\uf065", act: () => win.maximized = !win.maximized, danger: false },
- { icon: "\uf00d", act: () => root.close(), danger: true },
- ]
- Rectangle {
- required property var modelData
- width: 28
- height: 28
- radius: 14
- color: btnArea.containsMouse ? Qt.alpha(modelData.danger ? Theme.red : Theme.accent, 0.25) : "transparent"
-
- Text {
- anchors.centerIn: parent
- text: parent.modelData.icon
- font { family: Theme.iconFamily; pixelSize: Theme.fontSize - 2 }
- color: Theme.text
- }
-
- MouseArea {
- id: btnArea
- anchors.fill: parent
- hoverEnabled: true
- cursorShape: Qt.PointingHandCursor
- onClicked: parent.modelData.act()
- }
- }
+ // nf-fa-compress / nf-fa-expand and nf-fa-xmark, present
+ // in Inconsolata Nerd Font.
+ WindowButton {
+ icon: win.maximized ? "\uf066" : "\uf065"
+ onClicked: win.maximized = !win.maximized
+ }
+ WindowButton {
+ icon: "\uf00d"
+ danger: true
+ onClicked: root.close()
}
}