No forgetting, deleting or clearing on a single press, anywhere

Claude-Session: https://claude.ai/code/session_01Ms2FbjQy31TVf3CEvQhGM8
This commit is contained in:
Gabriel Brown
2026-08-25 00:41:39 -04:00
parent 88371d19f0
commit f9e5d3f470
8 changed files with 267 additions and 84 deletions
@@ -15,11 +15,16 @@ SettingRow {
readonly property bool custom: ThemeProfiles.activeProfile.shipped !== true
label: "Save as"
detail: root.custom
? "Saving again under a new name keeps both"
: "Editing a shipped theme forks it; give the fork a name to keep it"
// Armed, the row says what the delete actually costs: a saved theme is the
// only copy of its palette, terminal colours and effect values.
detail: deleteConfirm.armed
? "Deletes “" + String(ThemeProfiles.activeProfile.name ?? "this theme")
+ "” — its palette, terminal colours and effects go with it"
: (root.custom
? "Saving again under a new name keeps both"
: "Editing a shipped theme forks it; give the fork a name to keep it")
divider: false
controlWidth: root.custom ? 380 : 292
controlWidth: root.custom ? (deleteConfirm.armed ? 470 : 380) : 292
Row {
anchors.right: parent.right
@@ -83,23 +88,14 @@ SettingRow {
Keys.onSpacePressed: saveButton.save()
}
SettingsButton {
id: deleteButton
ConfirmAction {
id: deleteConfirm
visible: root.custom
text: "Delete"
tone: "danger"
activeFocusOnTab: visible
border.width: activeFocus ? 2 : 1
border.color: activeFocus ? Theme.danger : Theme.alpha(Theme.danger, 0.45)
function remove(): void {
ThemeProfiles.deleteProfile(ThemeProfiles.activeId);
}
onClicked: deleteButton.remove()
Keys.onReturnPressed: deleteButton.remove()
Keys.onSpacePressed: deleteButton.remove()
actionId: "theme-profile-delete:" + ThemeProfiles.activeId
armText: "Delete…"
confirmText: "Delete it"
onConfirmed: ThemeProfiles.deleteProfile(ThemeProfiles.activeId)
}
}
}