Show and set colour labels in the grid and develop, and filter by them
Colour labels could be read from a Lightroom sidecar and queried by the selector, but nothing drew one or set one, so the only labels a library held were ones another program had written. Every mark carries its label's initial on its colour — R, Y, G, B, P — so a label is read without telling red from green, which is what NFR-A11Y-3 asks of colour labels by name. A grid cell shows the mark before its filename. In the grid, 6, 7, 8 and 9 set red, yellow, green and blue as Lightroom's keys do, on the photograph under the pointer or on the selection by the rule the star keys follow; the same key again takes the label off, and over a mixed selection it sets it on all. The selection bar gains Label, which opens the six choices — each a mark and a name — and purple, which has no key, is there. In develop the top bar says "Label: Green" beside the mark, opens the same choices, and 6-9 label the open photograph. Each gesture is one catalog transaction, then the grid, the counts and both sidecars are written as a rating's are. The filter bar gains a chip per label, its mark and its name with a count, one at a time; the filter is one SQL term, travels in the place record, and "All" clears it.
This commit is contained in:
@@ -11,6 +11,7 @@ import { Theme } from "theme.slint";
|
||||
import { Develop } from "session.slint";
|
||||
import { Transfer } from "adjust.slint";
|
||||
import { Button, PanelHeading, Label, Value, Caption, Panel } from "widgets.slint";
|
||||
import { Labels, LabelMark, LabelPicker } from "labels.slint";
|
||||
|
||||
// Status strip — surfaces the GPU backend and adapter, which matters during
|
||||
// v0.1 because assumption A1 is exactly "does this compositing path work on
|
||||
@@ -43,6 +44,13 @@ export component StatusBar inherits Rectangle {
|
||||
/// Whether the edit can be stepped either way (FR-DEV-5).
|
||||
in property <bool> can-undo: false;
|
||||
in property <bool> can-redo: false;
|
||||
/// TRACES: FR-CAT-5
|
||||
/// The open photograph's colour label code, 0 for none, -1 where there
|
||||
/// is no library to hold one (files named on the command line).
|
||||
in property <int> colour-label: -1;
|
||||
/// Whether the label choices are open in the strip.
|
||||
property <bool> picking-label: false;
|
||||
callback label-picked(int);
|
||||
|
||||
callback back-to-library();
|
||||
callback open-people();
|
||||
@@ -115,6 +123,32 @@ export component StatusBar inherits Rectangle {
|
||||
|
||||
Caption { text: root.position; }
|
||||
|
||||
// TRACES: FR-CAT-5 | FR-UI-4 | NFR-A11Y-3
|
||||
// The label, shown and set here. The button says the label's name
|
||||
// beside its mark, so the strip reads "Label: Green" in words; with
|
||||
// none it offers "Label". Pressing it opens the six choices in the
|
||||
// strip, which close on the one chosen.
|
||||
Button {
|
||||
text: root.colour-label > 0 ? "Label: " + Labels.names[root.colour-label] : "Label";
|
||||
active: root.picking-label;
|
||||
visible: root.colour-label >= 0;
|
||||
y: (parent.height - self.height) / 2;
|
||||
clicked => { root.picking-label = !root.picking-label; }
|
||||
}
|
||||
|
||||
if root.colour-label > 0: LabelMark {
|
||||
code: root.colour-label;
|
||||
y: (parent.height - self.height) / 2;
|
||||
}
|
||||
|
||||
if root.picking-label && root.colour-label >= 0: LabelPicker {
|
||||
current: root.colour-label;
|
||||
chosen(code) => {
|
||||
root.label-picked(code);
|
||||
root.picking-label = false;
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle { horizontal-stretch: 1; }
|
||||
|
||||
// --- instrumentation lives in Settings now ------------------------
|
||||
|
||||
Reference in New Issue
Block a user