Add icon sizes to config

Icon sizes are stored as a zoom percentage. This may need to be updated
by a programmer with better ideas, but it seems a bit nicer than storing
the size in pixels and presenting that to the user.
This commit is contained in:
Josh Megnauth 2024-02-18 02:44:54 -05:00 committed by Jeremy Soller
parent 3167a9936c
commit 1f613860e4
4 changed files with 101 additions and 45 deletions

View file

@ -209,9 +209,10 @@ struct App {
impl App {
fn rescan_tab(&self) -> Command<Message> {
let location = self.tab.location.clone();
let icon_sizes = self.tab.config.icon_sizes;
Command::perform(
async move {
match tokio::task::spawn_blocking(move || location.scan()).await {
match tokio::task::spawn_blocking(move || location.scan(icon_sizes)).await {
Ok(items) => message::app(Message::TabRescan(items)),
Err(err) => {
log::warn!("failed to rescan: {}", err);