Skip to content

Commit

Permalink
- Check for and load absolute path icons
Browse files Browse the repository at this point in the history
  • Loading branch information
trigg committed Apr 5, 2024
1 parent a1c1dfb commit 21cae62
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/panel/widgets/launchers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,13 @@ struct DesktopLauncherInfo : public LauncherInfo

Glib::RefPtr<Gdk::Pixbuf> 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))
{
Expand Down

0 comments on commit 21cae62

Please sign in to comment.