Skip to content

Commit

Permalink
Check for and load absolute path icons in panel launchers (#227)
Browse files Browse the repository at this point in the history
* - Check for and load absolute path icons

* - Moved theme value after first potential return
- Cleaned up some style
  • Loading branch information
trigg authored Apr 12, 2024
1 parent a1c1dfb commit 3771047
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/panel/widgets/launchers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,13 @@ struct DesktopLauncherInfo : public LauncherInfo

Glib::RefPtr<Gdk::Pixbuf> get_pixbuf(int32_t size)
{
auto icon = app_info->get_icon()->to_string();
auto icon = app_info->get_icon()->to_string();
std::string absolute_path = "/";
if (!icon.compare(0, absolute_path.size(), absolute_path))
{
return Gdk::Pixbuf::create_from_file(icon, size, size);
}

auto theme = Gtk::IconTheme::get_default();

if (!theme->lookup_icon(icon, size))
Expand Down

0 comments on commit 3771047

Please sign in to comment.