From 15375deb9be73b76c0f0d7431b16f33e101b9776 Mon Sep 17 00:00:00 2001 From: Vee <53192279+elch01@users.noreply.github.com> Date: Sun, 19 Apr 2026 23:24:00 +0200 Subject: [PATCH] Add: Prefer system theme icons on flatpak packages small check if there is a icon present in the system theme --- usr/lib/linuxmint/mintinstall/mintinstall.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/usr/lib/linuxmint/mintinstall/mintinstall.py b/usr/lib/linuxmint/mintinstall/mintinstall.py index 044d0b9..e549d35 100755 --- a/usr/lib/linuxmint/mintinstall/mintinstall.py +++ b/usr/lib/linuxmint/mintinstall/mintinstall.py @@ -440,6 +440,11 @@ def repopulate_tile(self): self.icon.destroy() icon_string = self.pkginfo.get_icon(imaging.FEATURED_ICON_SIZE) + + # Check for flatpak names and if there is a icon present in the installed icon theme prefer that one + if self.pkginfo.pkg_hash.startswith("fp:") and Gtk.IconTheme.get_default().has_icon(self.pkginfo.name): + icon_string = self.pkginfo.name + if not icon_string: icon_string = imaging.FALLBACK_PACKAGE_ICON_PATH self.icon = imaging.get_icon(icon_string, imaging.FEATURED_ICON_SIZE) @@ -2717,6 +2722,11 @@ def show_package(self, pkginfo, previous_page): # Set source-agnostic things icon_string = self.get_application_icon_string(pkginfo, imaging.DETAILS_ICON_SIZE) + + # Check if package is a flatpak if so prefer themed icon over downloaded one + if is_flatpak and Gtk.IconTheme.get_default().has_icon(pkginfo.name): + icon_string = pkginfo.name + self.detail_view_icon.set_icon_string(icon_string) self.package_type_store.clear()