diff --git a/src/gui/gsc_main_window_iconview.cpp b/src/gui/gsc_main_window_iconview.cpp index 98e47cc..6e78c5a 100644 --- a/src/gui/gsc_main_window_iconview.cpp +++ b/src/gui/gsc_main_window_iconview.cpp @@ -554,10 +554,18 @@ Glib::RefPtr GscMainWindowIconView::load_icon_pixbuf(Glib::RefPtr icon; - // Try XDG version first + // Try the icon theme first; fall back to the bundled icon if needed. try { if (default_icon_theme && !xdg_icon_name.empty()) { icon = default_icon_theme->load_icon(xdg_icon_name, icon_size_, get_scale_factor(), Gtk::IconLookupFlags(0)); + + // Some icon themes may return an icon smaller than requested. + // In that case, fall back to the bundled icon. + if (icon && + (icon->get_width() < icon_size_ || + icon->get_height() < icon_size_)) { + icon.reset(); + } } } catch (...) { } // ignore exceptions