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:
@@ -254,7 +254,7 @@ pub(super) fn load_window(window: &AppWindow, ctl: &Rc<LibraryController>) {
|
||||
let window_size = *ctl.window.borrow();
|
||||
let offset = (*ctl.offset.borrow()).min(total.saturating_sub(window_size.min(total)));
|
||||
*ctl.offset.borrow_mut() = offset;
|
||||
window.set_library_offset(offset as i32);
|
||||
window.global::<Library>().set_library_offset(offset as i32);
|
||||
|
||||
// The axis the scrubber draws. A `MIN`/`MAX` and a `GROUP BY` over the
|
||||
// whole scope — 5.7 ms on 24,000 images — and the bars do not change as the
|
||||
@@ -308,7 +308,7 @@ pub(super) fn load_window(window: &AppWindow, ctl: &Rc<LibraryController>) {
|
||||
Some((lo, hi)) => (lo.min(t), hi.max(t)),
|
||||
})
|
||||
});
|
||||
window.set_library_window_label(
|
||||
window.global::<Library>().set_library_window_label(
|
||||
match span {
|
||||
Some((lo, hi)) => format!("{} – {}", format_date(lo), format_date(hi)),
|
||||
// Nothing here has a date yet: EXIF is read as thumbnails load, so
|
||||
|
||||
Reference in New Issue
Block a user