Skip to content

Commit

Permalink
Launcher: fallback to application-default-icon (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
danirabbit committed Jan 9, 2024
1 parent 70deba9 commit 6eb560a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/Launcher.vala
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,16 @@ public class Dock.Launcher : Gtk.Button {
};
popover.set_parent (this);

image = new Gtk.Image () {
gicon = app_info.get_icon ()
};
image = new Gtk.Image ();
image.get_style_context ().add_provider (css_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);

var icon = app_info.get_icon ();
if (icon != null && Gtk.IconTheme.get_for_display (Gdk.Display.get_default ()).has_gicon (icon)) {
image.gicon = icon;
} else {
image.gicon = new ThemedIcon ("application-default-icon");
}

var badge = new Gtk.Label ("!") {
halign = END,
valign = START
Expand Down

0 comments on commit 6eb560a

Please sign in to comment.