Move the filter bar and the timeline onto the library's Slint global
The date-range fields and their band on the capture-time axis, the timeline's bars, labels, scrub/pinch/pan/zoom callbacks and its sweep/current-bucket/anchored state, and the filter bar's people chips, mode, eyes-open toggle and gesture reference move from AppWindow onto the `Library` global. Rust reaches them through window.global::<Library>() rather than window.set_/get_/on_ on the root, as the earlier commits on this branch did for the grid's cells, selection, ratings and keywords.
This commit is contained in:
+34
-82
@@ -337,20 +337,6 @@ export component AppWindow inherits Window {
|
||||
in property <bool> library-offline: false;
|
||||
in property <string> library-offline-reason: "";
|
||||
in property <string> library-offline-since: "";
|
||||
/// Whether the grid is narrowed to the timeline's visible span.
|
||||
in-out property <bool> library-range-active: false;
|
||||
callback library-toggle-date-range();
|
||||
/// TRACES: FR-CAT-6
|
||||
in property <string> library-range-from;
|
||||
in property <string> library-range-to;
|
||||
in property <bool> library-range-invalid: false;
|
||||
callback library-range-edited(string, string);
|
||||
/// The same range as a band on the capture-time axis, and the ends of it
|
||||
/// dragged. Fractions of the span the axis is drawn over — Rust owns the
|
||||
/// conversion both ways, so the band lands where the finger left it.
|
||||
in property <float> library-range-from-fraction: -1;
|
||||
in property <float> library-range-to-fraction: -1;
|
||||
callback library-timeline-range-changed(float, float);
|
||||
callback library-retry-connection();
|
||||
|
||||
// --- pinning a collection offline (FR-NC-6a) ---
|
||||
@@ -388,23 +374,6 @@ export component AppWindow inherits Window {
|
||||
callback recovery-rebuild();
|
||||
callback recovery-dismiss();
|
||||
|
||||
in property <string> library-root-label: "";
|
||||
in-out property <[TimelineBar]> library-timeline;
|
||||
in property <string> library-timeline-label: "";
|
||||
in property <string> library-window-label: "";
|
||||
in property <int> library-offset: 0;
|
||||
|
||||
in property <int> library-sweep-done: 0;
|
||||
in property <int> library-sweep-total: 0;
|
||||
|
||||
in property <int> library-current-bucket: 0;
|
||||
in property <float> library-current-fraction: -1;
|
||||
in property <bool> library-timeline-anchored: false;
|
||||
|
||||
callback library-scrub-fraction(float);
|
||||
callback library-timeline-pinch(float);
|
||||
callback library-timeline-pan(float);
|
||||
callback library-timeline-zoom(int);
|
||||
in property <bool> library-syncing: false;
|
||||
/// TRACES: FR-CAT-3 | FR-NC-3
|
||||
/// The whole-library thumbnail pass, launched from the settings page.
|
||||
@@ -511,23 +480,6 @@ export component AppWindow inherits Window {
|
||||
|
||||
|
||||
|
||||
/// Whose photographs the grid is narrowed to, one entry each.
|
||||
in property <[PersonChip]> library-filter-people;
|
||||
/// Whether those people are an intersection rather than a union.
|
||||
in property <bool> library-filter-people-all: false;
|
||||
callback library-filter-person-cleared(int);
|
||||
callback library-filter-people-mode-toggled();
|
||||
/// TRACES: FR-CULL-8a | FR-CULL-13
|
||||
/// Whether the grid is narrowed to photographs with nobody blinking.
|
||||
in property <bool> library-filter-eyes-open: false;
|
||||
callback library-filter-eyes-open-toggled();
|
||||
/// Everyone the library knows, for the filter bar's people tray.
|
||||
/// TRACES: FR-UI-4
|
||||
/// The gesture reference's rows, read from the generated table.
|
||||
in property <[GestureRow]> library-gestures;
|
||||
in property <[PersonChip]> library-people;
|
||||
callback library-people-listed();
|
||||
callback library-filter-person-toggled(int);
|
||||
|
||||
|
||||
callback next-image();
|
||||
@@ -1318,7 +1270,7 @@ in property <bool> panel-visible: true;
|
||||
confirm-all() => { root.identity-confirm-all(); }
|
||||
split-picked() => { root.identity-split-picked(); }
|
||||
compact: !root.expanded;
|
||||
photos-filtered: root.library-filter-people.length > 0;
|
||||
photos-filtered: Library.library-filter-people.length > 0;
|
||||
regrouping: root.identity-regrouping;
|
||||
regroup-status: root.identity-regroup-status;
|
||||
merge-probability: root.identity-merge-probability;
|
||||
@@ -1471,8 +1423,8 @@ in property <bool> panel-visible: true;
|
||||
local-only: Library.library-local-only;
|
||||
local-count: Library.library-local-count;
|
||||
toggle-local-only() => { Library.library-toggle-local-only(); }
|
||||
range-active: root.library-range-active;
|
||||
toggle-date-range() => { root.library-toggle-date-range(); }
|
||||
range-active: Library.library-range-active;
|
||||
toggle-date-range() => { Library.library-toggle-date-range(); }
|
||||
clear-selection() => { Library.library-clear-selection(); }
|
||||
select-all() => { Library.library-select-all(); }
|
||||
reorderable: Library.library-reorderable;
|
||||
@@ -1480,14 +1432,14 @@ in property <bool> panel-visible: true;
|
||||
collection-from-selection(name) => {
|
||||
Library.library-collection-from-selection(name);
|
||||
}
|
||||
range-from: root.library-range-from;
|
||||
range-to: root.library-range-to;
|
||||
range-invalid: root.library-range-invalid;
|
||||
range-edited(a, b) => { root.library-range-edited(a, b); }
|
||||
range-from-fraction: root.library-range-from-fraction;
|
||||
range-to-fraction: root.library-range-to-fraction;
|
||||
range-from: Library.library-range-from;
|
||||
range-to: Library.library-range-to;
|
||||
range-invalid: Library.library-range-invalid;
|
||||
range-edited(a, b) => { Library.library-range-edited(a, b); }
|
||||
range-from-fraction: Library.library-range-from-fraction;
|
||||
range-to-fraction: Library.library-range-to-fraction;
|
||||
timeline-range-changed(a, b) => {
|
||||
root.library-timeline-range-changed(a, b);
|
||||
Library.library-timeline-range-changed(a, b);
|
||||
}
|
||||
|
||||
collections-visible: root.collections-visible;
|
||||
@@ -1495,11 +1447,11 @@ in property <bool> panel-visible: true;
|
||||
|
||||
pin-done: root.library-pin-done;
|
||||
pin-total: root.library-pin-total;
|
||||
root-label: root.library-root-label;
|
||||
timeline: root.library-timeline;
|
||||
timeline-label: root.library-timeline-label;
|
||||
window-label: root.library-window-label;
|
||||
offset: root.library-offset;
|
||||
root-label: Library.library-root-label;
|
||||
timeline: Library.library-timeline;
|
||||
timeline-label: Library.library-timeline-label;
|
||||
window-label: Library.library-window-label;
|
||||
offset: Library.library-offset;
|
||||
selected-count: Library.library-selected-count;
|
||||
scope-label: Collections.collection-scope-label;
|
||||
settings-armed: Transfer.armed;
|
||||
@@ -1524,17 +1476,17 @@ in property <bool> panel-visible: true;
|
||||
// TRACES: FR-MRG-1
|
||||
merge-selection => { root.library-merge-selection(); }
|
||||
|
||||
sweep-done: root.library-sweep-done;
|
||||
sweep-total: root.library-sweep-total;
|
||||
sweep-done: Library.library-sweep-done;
|
||||
sweep-total: Library.library-sweep-total;
|
||||
|
||||
current-bucket: root.library-current-bucket;
|
||||
current-bucket-fraction: root.library-current-fraction;
|
||||
timeline-anchored: root.library-timeline-anchored;
|
||||
current-bucket: Library.library-current-bucket;
|
||||
current-bucket-fraction: Library.library-current-fraction;
|
||||
timeline-anchored: Library.library-timeline-anchored;
|
||||
|
||||
scrub-fraction(f) => { root.library-scrub-fraction(f); }
|
||||
timeline-pinch(r) => { root.library-timeline-pinch(r); }
|
||||
timeline-pan(d) => { root.library-timeline-pan(d); }
|
||||
timeline-zoom(d) => { root.library-timeline-zoom(d); }
|
||||
scrub-fraction(f) => { Library.library-scrub-fraction(f); }
|
||||
timeline-pinch(r) => { Library.library-timeline-pinch(r); }
|
||||
timeline-pan(d) => { Library.library-timeline-pan(d); }
|
||||
timeline-zoom(d) => { Library.library-timeline-zoom(d); }
|
||||
syncing: root.library-syncing;
|
||||
requested-cell-size: Library.library-cell-size;
|
||||
touched <=> Library.library-touched;
|
||||
@@ -1590,11 +1542,11 @@ in property <bool> panel-visible: true;
|
||||
}
|
||||
open-membership() => { Library.library-open-membership(); }
|
||||
|
||||
filter-people: root.library-filter-people;
|
||||
filter-people-all: root.library-filter-people-all;
|
||||
filter-eyes-open: root.library-filter-eyes-open;
|
||||
people: root.library-people;
|
||||
gestures: root.library-gestures;
|
||||
filter-people: Library.library-filter-people;
|
||||
filter-people-all: Library.library-filter-people-all;
|
||||
filter-eyes-open: Library.library-filter-eyes-open;
|
||||
people: Library.library-people;
|
||||
gestures: Library.library-gestures;
|
||||
filter-min-rating: Library.library-filter-min-rating;
|
||||
filter-unjudged: Library.library-filter-unjudged;
|
||||
filter-flag: Library.library-filter-flag;
|
||||
@@ -1629,11 +1581,11 @@ in property <bool> panel-visible: true;
|
||||
Library.library-filter-unjudged-changed(on);
|
||||
}
|
||||
filter-flag-changed(f) => { Library.library-filter-flag-changed(f); }
|
||||
filter-person-cleared(id) => { root.library-filter-person-cleared(id); }
|
||||
filter-people-mode-toggled() => { root.library-filter-people-mode-toggled(); }
|
||||
filter-eyes-open-toggled() => { root.library-filter-eyes-open-toggled(); }
|
||||
people-listed() => { root.library-people-listed(); }
|
||||
filter-person-toggled(id) => { root.library-filter-person-toggled(id); }
|
||||
filter-person-cleared(id) => { Library.library-filter-person-cleared(id); }
|
||||
filter-people-mode-toggled() => { Library.library-filter-people-mode-toggled(); }
|
||||
filter-eyes-open-toggled() => { Library.library-filter-eyes-open-toggled(); }
|
||||
people-listed() => { Library.library-people-listed(); }
|
||||
filter-person-toggled(id) => { Library.library-filter-person-toggled(id); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -646,6 +646,54 @@ export global Library {
|
||||
callback library-filter-min-rating-changed(int);
|
||||
callback library-filter-unjudged-changed(bool);
|
||||
callback library-filter-flag-changed(int);
|
||||
/// Whether the grid is narrowed to the timeline's visible span.
|
||||
in-out property <bool> library-range-active: false;
|
||||
callback library-toggle-date-range();
|
||||
/// TRACES: FR-CAT-6
|
||||
in property <string> library-range-from;
|
||||
in property <string> library-range-to;
|
||||
in property <bool> library-range-invalid: false;
|
||||
callback library-range-edited(string, string);
|
||||
/// The same range as a band on the capture-time axis, and the ends of it
|
||||
/// dragged. Fractions of the span the axis is drawn over — Rust owns the
|
||||
/// conversion both ways, so the band lands where the finger left it.
|
||||
in property <float> library-range-from-fraction: -1;
|
||||
in property <float> library-range-to-fraction: -1;
|
||||
callback library-timeline-range-changed(float, float);
|
||||
in property <string> library-root-label: "";
|
||||
in-out property <[TimelineBar]> library-timeline;
|
||||
in property <string> library-timeline-label: "";
|
||||
in property <string> library-window-label: "";
|
||||
in property <int> library-offset: 0;
|
||||
|
||||
in property <int> library-sweep-done: 0;
|
||||
in property <int> library-sweep-total: 0;
|
||||
|
||||
in property <int> library-current-bucket: 0;
|
||||
in property <float> library-current-fraction: -1;
|
||||
in property <bool> library-timeline-anchored: false;
|
||||
|
||||
callback library-scrub-fraction(float);
|
||||
callback library-timeline-pinch(float);
|
||||
callback library-timeline-pan(float);
|
||||
callback library-timeline-zoom(int);
|
||||
/// Whose photographs the grid is narrowed to, one entry each.
|
||||
in property <[PersonChip]> library-filter-people;
|
||||
/// Whether those people are an intersection rather than a union.
|
||||
in property <bool> library-filter-people-all: false;
|
||||
callback library-filter-person-cleared(int);
|
||||
callback library-filter-people-mode-toggled();
|
||||
/// TRACES: FR-CULL-8a | FR-CULL-13
|
||||
/// Whether the grid is narrowed to photographs with nobody blinking.
|
||||
in property <bool> library-filter-eyes-open: false;
|
||||
callback library-filter-eyes-open-toggled();
|
||||
/// Everyone the library knows, for the filter bar's people tray.
|
||||
/// TRACES: FR-UI-4
|
||||
/// The gesture reference's rows, read from the generated table.
|
||||
in property <[GestureRow]> library-gestures;
|
||||
in property <[PersonChip]> library-people;
|
||||
callback library-people-listed();
|
||||
callback library-filter-person-toggled(int);
|
||||
}
|
||||
|
||||
// The photo roll: the grid's loaded window along the foot of the develop view.
|
||||
|
||||
Reference in New Issue
Block a user