We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0d02f68 + 085a1ed commit ae997adCopy full SHA for ae997ad
src/AAppIconLabel.cpp
@@ -154,6 +154,16 @@ void AAppIconLabel::updateAppIcon() {
154
update_app_icon_ = false;
155
if (app_icon_name_.empty()) {
156
image_.set_visible(false);
157
+ }
158
+ else if (app_icon_name_.front() == '/') {
159
+ auto pixbuf = Gdk::Pixbuf::create_from_file(app_icon_name_);
160
+ int scaled_icon_size = app_icon_size_ * image_.get_scale_factor();
161
+ pixbuf = Gdk::Pixbuf::create_from_file(app_icon_name_, scaled_icon_size, scaled_icon_size);
162
+
163
+ auto surface = Gdk::Cairo::create_surface_from_pixbuf(pixbuf, image_.get_scale_factor(),
164
+ image_.get_window());
165
+ image_.set(surface);
166
+ image_.set_visible(true);
167
} else {
168
image_.set_from_icon_name(app_icon_name_, Gtk::ICON_SIZE_INVALID);
169
image_.set_visible(true);
0 commit comments