From 21cae62c4c7040088d4c9808cd338342babfd339 Mon Sep 17 00:00:00 2001 From: trigg Date: Fri, 5 Apr 2024 08:34:26 +0100 Subject: [PATCH] - Check for and load absolute path icons --- src/panel/widgets/launchers.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/panel/widgets/launchers.cpp b/src/panel/widgets/launchers.cpp index 406787fb..7d8574e3 100644 --- a/src/panel/widgets/launchers.cpp +++ b/src/panel/widgets/launchers.cpp @@ -34,8 +34,13 @@ struct DesktopLauncherInfo : public LauncherInfo Glib::RefPtr get_pixbuf(int32_t size) { - auto icon = app_info->get_icon()->to_string(); - auto theme = Gtk::IconTheme::get_default(); + auto icon = app_info->get_icon()->to_string(); + auto theme = Gtk::IconTheme::get_default(); + std::string absolute_path = "/"; + if (!icon.compare(0, absolute_path.size(), absolute_path)) + { + return Gdk::Pixbuf::create_from_file(icon, size, size); + } if (!theme->lookup_icon(icon, size)) {