Merge pull request #1793 from pop-os/icons

Fix small file icons from alternative icon themes
This commit is contained in:
Jeremy Soller 2026-05-12 09:13:49 -06:00 committed by GitHub
commit 048ed3187b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 5 deletions

View file

@ -269,6 +269,7 @@ fn button_style(
pub fn folder_icon(path: &PathBuf, icon_size: u16) -> widget::icon::Handle {
widget::icon::from_name(SPECIAL_DIRS.get(path).map_or("folder", |x| *x))
.prefer_svg(true)
.size(icon_size)
.handle()
}
@ -581,7 +582,10 @@ fn desktop_icon_handle(icon: &str, size: u16) -> widget::icon::Handle {
if icon_path.is_absolute() && icon_path.exists() {
widget::icon::from_path(icon_path.to_path_buf())
} else {
widget::icon::from_name(icon).size(size).handle()
widget::icon::from_name(icon)
.prefer_svg(true)
.size(size)
.handle()
}
}
@ -5429,8 +5433,7 @@ impl Tab {
widget::button::custom(
widget::icon::icon(item.icon_handle_grid.clone())
.content_fit(ContentFit::Contain)
.size(icon_sizes.grid())
.width(Length::Shrink),
.size(icon_sizes.grid()),
)
.padding(space_xxxs)
.class(button_style(