Skip to content

Commit e89f5cd

Browse files
committed
dock: fix custom icons using path
1 parent bcb6521 commit e89f5cd

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

‎src/util/gtk-utils.cpp‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,15 @@ bool image_set_icon(Gtk::Image & image, Glib::ustring path)
139139
{
140140
if (custom_icons.count(app_id) > 0)
141141
{
142-
image.set_from_icon_name(custom_icons[app_id]);
142+
std::string next_path = custom_icons[app_id];
143+
if ((next_path.rfind("/", 0) == 0) || (next_path.rfind("~", 0) == 0))
144+
{
145+
image.set(next_path);
146+
} else
147+
{
148+
image.set_from_icon_name(next_path);
149+
}
150+
143151
return true;
144152
}
145153

0 commit comments

Comments
 (0)