diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-16 16:06:33 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-16 16:06:33 +0200 |
| commit | f6ceae477979b32869c0c17e2b1fc05477d6eb81 (patch) | |
| tree | 4fecf207f449e7a454d4ee80e28407ddfa63df2d /desktop/Button.qml | |
| parent | 9a0c898a7a3d6c134626f05508c63840477e4be3 (diff) | |
| download | quickshell-f6ceae477979b32869c0c17e2b1fc05477d6eb81.tar.gz quickshell-f6ceae477979b32869c0c17e2b1fc05477d6eb81.zip | |
feat(assistant): Ask presets in the file state
A row of canned questions matching every staged file's kind, plus Compare
for two or more files: one click asks it, Shift+click puts it in the input
to edit first. Defaults live in Presets.js and the list in use in Prefs, so
a future drawer settings page can edit it; a saved list that does not
validate reads as the defaults. Each prompt asks for an answer in the
document's language. Code and configuration get their own kind, so a
script is offered Explain and Review rather than Summarize. Button's
clicked signal carries the mouse event for the Shift check.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'desktop/Button.qml')
| -rw-r--r-- | desktop/Button.qml | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/desktop/Button.qml b/desktop/Button.qml index b93a926..6a977fa 100644 --- a/desktop/Button.qml +++ b/desktop/Button.qml @@ -17,7 +17,9 @@ Rectangle { property alias font: label.font property bool danger: false property bool enabled: true - signal clicked + // The mouse event, for a caller that reads modifiers; a handler that + // takes no argument ignores it. + signal clicked(var mouse) implicitWidth: label.implicitWidth + 22 implicitHeight: label.implicitHeight + 12 @@ -44,6 +46,6 @@ Rectangle { anchors.fill: parent hoverEnabled: true cursorShape: btn.enabled ? Qt.PointingHandCursor : Qt.ArrowCursor - onClicked: if (btn.enabled) btn.clicked() + onClicked: mouse => { if (btn.enabled) btn.clicked(mouse); } } } |
