Dynamically load thumbnails based on what files are visible

This commit is contained in:
Jeremy Soller 2024-02-29 12:26:45 -07:00
parent 5c8fcd4f2e
commit 27b29e9fd8
No known key found for this signature in database
GPG key ID: D02FD439211AF56F
3 changed files with 120 additions and 94 deletions

View file

@ -12,6 +12,7 @@ use cosmic::{
subscription::{self, Subscription},
window, Event, Length, Size,
},
theme,
widget::{self, segmented_button},
Application, ApplicationExt, Element,
};
@ -616,13 +617,13 @@ impl Application for App {
/// Creates a view after each update.
fn view(&self) -> Element<Message> {
let cosmic_theme::Spacing { space_xxs, .. } = self.core().system_theme().cosmic().spacing;
let cosmic_theme::Spacing { space_xxs, .. } = theme::active().cosmic().spacing;
let mut tab_column = widget::column::with_capacity(2);
tab_column = tab_column.push(
//TODO: key binds for dialog
self.tab
.view(self.core(), &HashMap::new())
.view(&HashMap::new())
.map(move |message| Message::TabMessage(message)),
);