Close the help sheet with Escape, and keep keys from acting behind it

F1 opens the help sheet from the grid, and nothing on the keyboard closed
it: Escape fell through to the shell, and every other key went on judging,
labelling and keywording the photographs hidden behind the sheet.

Escape and Back now close the sheet first, ahead of the grid's other
sheets, since it is drawn over all of them. While it is open the grid's
handler declines every other key, so a stray P or Ctrl+K changes nothing
the reader cannot see.
This commit is contained in:
2026-09-24 23:42:27 -04:00
parent d489a34190
commit f8737e3fda
4 changed files with 54 additions and 39 deletions
File diff suppressed because one or more lines are too long
+21 -21
View File
@@ -521,7 +521,7 @@ Each chip is the label's mark and its name, so the one you want is found by read
Lightroom's and darktable's chords. Every export runs on the saved defaults, so the plain chord opens them beside an Export button and the shifted one skips straight to exporting. Lightroom's and darktable's chords. Every export runs on the saved defaults, so the plain chord opens them beside an Export button and the shifted one skips straight to exporting.
<sub>`ui/dr-ui/ui/library.slint:3107`</sub> <sub>`ui/dr-ui/ui/library.slint:3120`</sub>
### Paste copied settings onto the selection ### Paste copied settings onto the selection
@@ -530,7 +530,7 @@ Lightroom's and darktable's chords. Every export runs on the saved defaults, so
- **Keyboard** — `Ctrl+V` - **Keyboard** — `Ctrl+V`
- **See it** — [in the manual](manual/README.md#copying-settings) - **See it** — [in the manual](manual/README.md#copying-settings)
<sub>`ui/dr-ui/ui/library.slint:3131`</sub> <sub>`ui/dr-ui/ui/library.slint:3144`</sub>
### Keyword the selection ### Keyword the selection
@@ -540,7 +540,7 @@ Lightroom's and darktable's chords. Every export runs on the saved defaults, so
Lightroom's keywording chord. The sheet opens with its field ready for typing, so the keys that judge in the grid are out of the way until it closes. Lightroom's keywording chord. The sheet opens with its field ready for typing, so the keys that judge in the grid are out of the way until it closes.
<sub>`ui/dr-ui/ui/library.slint:3160`</sub> <sub>`ui/dr-ui/ui/library.slint:3173`</sub>
### Show only photographs with some number of stars ### Show only photographs with some number of stars
@@ -551,7 +551,7 @@ Lightroom's keywording chord. The sheet opens with its field ready for typing, s
The chips say "this many or more". A range with a ceiling — the twos and threes still to be decided — is the keyboard's alone, and the bar says so in words while it holds. The chips say "this many or more". A range with a ceiling — the twos and threes still to be decided — is the keyboard's alone, and the bar says so in words while it holds.
<sub>`ui/dr-ui/ui/library.slint:3194`</sub> <sub>`ui/dr-ui/ui/library.slint:3207`</sub>
### Give photographs a colour label ### Give photographs a colour label
@@ -562,7 +562,7 @@ The chips say "this many or more". A range with a ceiling — the twos and three
Lightroom's keys, so hands that learned them there need not learn them again. Purple has no key there either, and is on the bar. Every mark carries its label's initial, so the label is read without telling the colours apart. Lightroom's keys, so hands that learned them there need not learn them again. Purple has no key there either, and is on the bar. Every mark carries its label's initial, so the label is read without telling the colours apart.
<sub>`ui/dr-ui/ui/library.slint:3244`</sub> <sub>`ui/dr-ui/ui/library.slint:3257`</sub>
### Pick or reject a photograph ### Pick or reject a photograph
@@ -572,7 +572,7 @@ Lightroom's keys, so hands that learned them there need not learn them again. Pu
The keys every culling tool uses, so muscle memory built elsewhere works here. The keys every culling tool uses, so muscle memory built elsewhere works here.
<sub>`ui/dr-ui/ui/library.slint:3268`</sub> <sub>`ui/dr-ui/ui/library.slint:3281`</sub>
### Move photographs to the trash ### Move photographs to the trash
@@ -582,15 +582,15 @@ The keys every culling tool uses, so muscle memory built elsewhere works here.
The bin acts on one photograph, so a stray click cannot trash a selection; the key acts on the selection because that is what every file manager's Delete does. Both are undone from the trash view. The bin acts on one photograph, so a stray click cannot trash a selection; the key acts on the selection because that is what every file manager's Delete does. Both are undone from the trash view.
<sub>`ui/dr-ui/ui/library.slint:3295`</sub> <sub>`ui/dr-ui/ui/library.slint:3308`</sub>
### Open this list ### Open this list
- **Touch** — Press Help in the header - **Touch** — Press Help in the header, and Done to put it away
- **Pointer** — Press Help in the header - **Pointer** — Press Help in the header, and Done to put it away
- **Keyboard** — `F1` - **Keyboard** — `F1`, and `Escape` to put it away
<sub>`ui/dr-ui/ui/library.slint:3320`</sub> <sub>`ui/dr-ui/ui/library.slint:3333`</sub>
### Rename the collection the grid is showing ### Rename the collection the grid is showing
@@ -598,7 +598,7 @@ The bin acts on one photograph, so a stray click cannot trash a selection; the k
- **Pointer** — Double-click it in the sidebar - **Pointer** — Double-click it in the sidebar
- **Keyboard** — `F2` - **Keyboard** — `F2`
<sub>`ui/dr-ui/ui/library.slint:3326`</sub> <sub>`ui/dr-ui/ui/library.slint:3341`</sub>
### Move through the grid ### Move through the grid
@@ -608,7 +608,7 @@ The bin acts on one photograph, so a stray click cannot trash a selection; the k
The cursor selects what it lands on, so walking and judging are one hand's work. The cursor selects what it lands on, so walking and judging are one hand's work.
<sub>`ui/dr-ui/ui/library.slint:3346`</sub> <sub>`ui/dr-ui/ui/library.slint:3361`</sub>
### Resize the thumbnails ### Resize the thumbnails
@@ -619,7 +619,7 @@ The cursor selects what it lands on, so walking and judging are one hand's work.
There is no wheel on a tablet, so without the pinch the cell size could only be changed by a control a finger cannot reach. There is no wheel on a tablet, so without the pinch the cell size could only be changed by a control a finger cannot reach.
<sub>`ui/dr-ui/ui/library.slint:3473`</sub> <sub>`ui/dr-ui/ui/library.slint:3488`</sub>
### File photographs in a collection ### File photographs in a collection
@@ -629,7 +629,7 @@ There is no wheel on a tablet, so without the pinch the cell size could only be
The selection is what the drag carries, which is why selecting several is worth the mode: forty photographs file in one gesture. The selection is what the drag carries, which is why selecting several is worth the mode: forty photographs file in one gesture.
<sub>`ui/dr-ui/ui/library.slint:3672`</sub> <sub>`ui/dr-ui/ui/library.slint:3687`</sub>
### Open a photograph ### Open a photograph
@@ -640,7 +640,7 @@ The selection is what the drag carries, which is why selecting several is worth
A tap opens; a tap that *moved* does not. Travel is what separates a deliberate tap from a hand brushing past, and it is the only thing that does: the two are the same length. An earlier version required the finger to dwell 120 ms instead, and that rejected ordinary taps — a real tap is often quicker than a brush. A tap opens; a tap that *moved* does not. Travel is what separates a deliberate tap from a hand brushing past, and it is the only thing that does: the two are the same length. An earlier version required the finger to dwell 120 ms instead, and that rejected ordinary taps — a real tap is often quicker than a brush.
<sub>`ui/dr-ui/ui/library.slint:3969`</sub> <sub>`ui/dr-ui/ui/library.slint:3984`</sub>
### Rate a photograph without opening it ### Rate a photograph without opening it
@@ -651,7 +651,7 @@ A tap opens; a tap that *moved* does not. Travel is what separates a deliberate
A star has to take the press without it also reaching the cell, or every rating throws the user into develop. A star has to take the press without it also reaching the cell, or every rating throws the user into develop.
<sub>`ui/dr-ui/ui/library.slint:4092`</sub> <sub>`ui/dr-ui/ui/library.slint:4107`</sub>
### Choose the frame a folded burst shows ### Choose the frame a folded burst shows
@@ -661,7 +661,7 @@ A star has to take the press without it also reaching the cell, or every rating
A folded burst draws its earliest frame, which is a fact about the clock and not a judgement about the photograph — nothing in this application ranks a frame (FR-CULL-5). But the point of a burst is that one of the twelve is better than the other eleven, and the photographer is the only one who knows which. So the choice is offered on the frames themselves, while they are open and side by side, which is the one moment the alternatives are on screen to be compared. A folded burst draws its earliest frame, which is a fact about the clock and not a judgement about the photograph — nothing in this application ranks a frame (FR-CULL-5). But the point of a burst is that one of the twelve is better than the other eleven, and the photographer is the only one who knows which. So the choice is offered on the frames themselves, while they are open and side by side, which is the one moment the alternatives are on screen to be compared.
<sub>`ui/dr-ui/ui/library.slint:4225`</sub> <sub>`ui/dr-ui/ui/library.slint:4240`</sub>
### Drop the selection but keep selecting ### Drop the selection but keep selecting
@@ -672,7 +672,7 @@ A folded burst draws its earliest frame, which is a fact about the clock and not
Distinct from Done, which leaves the mode entirely. Clearing keeps it, so the next selection can start straight away. Distinct from Done, which leaves the mode entirely. Clearing keeps it, so the next selection can start straight away.
<sub>`ui/dr-ui/ui/library.slint:4902`</sub> <sub>`ui/dr-ui/ui/library.slint:4917`</sub>
### Select everything the grid is showing ### Select everything the grid is showing
@@ -683,7 +683,7 @@ Distinct from Done, which leaves the mode entirely. Clearing keeps it, so the ne
A scoped grid of two hundred frames is two hundred taps otherwise, and "all of them, except those three" is a far more common shape than the taps it took to say it. A scoped grid of two hundred frames is two hundred taps otherwise, and "all of them, except those three" is a far more common shape than the taps it took to say it.
<sub>`ui/dr-ui/ui/library.slint:4921`</sub> <sub>`ui/dr-ui/ui/library.slint:4936`</sub>
### Take photographs out of a collection ### Take photographs out of a collection
@@ -693,4 +693,4 @@ A scoped grid of two hundred frames is two hundred taps otherwise, and "all of t
The badge on a cell says a photograph is filed in three collections and never which. This is the sheet that names them, and the only way out of one the grid is not currently scoped to. The badge on a cell says a photograph is filed in three collections and never which. This is the sheet that names them, and the only way out of one the grid is not currently scoped to.
<sub>`ui/dr-ui/ui/library.slint:5102`</sub> <sub>`ui/dr-ui/ui/library.slint:5117`</sub>
+3 -3
View File
@@ -475,9 +475,9 @@ pub const GESTURES: &[Gesture] = &[
Gesture { Gesture {
title: "Open this list", title: "Open this list",
section: "Library grid", section: "Library grid",
touch: "Press Help in the header", touch: "Press Help in the header, and Done to put it away",
pointer: "Press Help in the header", pointer: "Press Help in the header, and Done to put it away",
keys: "F1", keys: "F1, and Escape to put it away",
manual: "", manual: "",
}, },
Gesture { Gesture {
+18 -3
View File
@@ -3082,6 +3082,13 @@ export component LibraryGrid inherits Rectangle {
// button, and a sheet it walked straight past would leave // button, and a sheet it walked straight past would leave
// the user out of the grid with their selection gone. // the user out of the grid with their selection gone.
if (Keys.chord(event) == "Back" || Keys.chord(event) == "Escape") { if (Keys.chord(event) == "Back" || Keys.chord(event) == "Escape") {
// The help sheet first: it is drawn over everything
// else here, and F1 opened it from the keyboard, so
// the keyboard has to be able to put it away.
if (root.helping) {
root.helping = false;
return accept;
}
if (root.keywording) { if (root.keywording) {
root.keywording = false; root.keywording = false;
return accept; return accept;
@@ -3104,6 +3111,12 @@ export component LibraryGrid inherits Rectangle {
} }
return reject; return reject;
} }
// Nothing else acts behind the help sheet: a key that
// judged or keyworded the grid under it would change
// photographs the reader cannot see.
if (root.helping) {
return reject;
}
// GESTURE: Export the selection as the last export was // GESTURE: Export the selection as the last export was
// where: Library grid // where: Library grid
// touch: Select them, then Export in the selection bar // touch: Select them, then Export in the selection bar
@@ -3319,9 +3332,11 @@ export component LibraryGrid inherits Rectangle {
// mode. Rust ignores it when nothing is scoped. // mode. Rust ignores it when nothing is scoped.
// GESTURE: Open this list // GESTURE: Open this list
// where: Library grid // where: Library grid
// touch: Press Help in the header // touch: Press Help in the header, and Done to put it
// pointer: Press Help in the header // away
// keys: `F1` // pointer: Press Help in the header, and Done to put it
// away
// keys: `F1`, and `Escape` to put it away
// //
// GESTURE: Rename the collection the grid is showing // GESTURE: Rename the collection the grid is showing
// where: Library grid // where: Library grid