Commit 54807312 authored by Matthias Clasen's avatar Matthias Clasen Committed by Robert Roth

Ensure icons are at the right size

GTK+ will no longer force-scale icons that are not available in
the right size, unless it is told to do so.

https://bugzilla.gnome.org/show_bug.cgi?id=738467
parent 367f6a03
......@@ -156,7 +156,7 @@ void PrettyTable::file_monitor_event(Glib::RefPtr<Gio::File>,
Glib::RefPtr<Gdk::Pixbuf>
PrettyTable::get_icon_from_theme(const ProcInfo &info)
{
return this->theme->load_icon(info.name, APP_ICON_SIZE, Gtk::ICON_LOOKUP_USE_BUILTIN);
return this->theme->load_icon(info.name, APP_ICON_SIZE, Gtk::ICON_LOOKUP_USE_BUILTIN | Gtk::ICON_LOOKUP_FORCE_SIZE);
}
......@@ -189,7 +189,7 @@ PrettyTable::get_icon_from_default(const ProcInfo &info)
IconCache::iterator it(this->defaults.find(name));
if (it == this->defaults.end()) {
pix = this->theme->load_icon(name, APP_ICON_SIZE, Gtk::ICON_LOOKUP_USE_BUILTIN);
pix = this->theme->load_icon(name, APP_ICON_SIZE, Gtk::ICON_LOOKUP_USE_BUILTIN | Gtk::ICON_LOOKUP_FORCE_SIZE);
if (pix)
this->defaults[name] = pix;
} else
......@@ -214,7 +214,7 @@ PrettyTable::get_icon_from_gio(const ProcInfo &info)
gicon = app->get_icon();
if (gicon)
icon = this->theme->load_gicon(gicon, APP_ICON_SIZE, Gtk::ICON_LOOKUP_USE_BUILTIN);
icon = this->theme->load_gicon(gicon, APP_ICON_SIZE, Gtk::ICON_LOOKUP_USE_BUILTIN | Gtk::ICON_LOOKUP_FORCE_SIZE);
}
g_strfreev(cmdline);
......@@ -240,7 +240,7 @@ PrettyTable::get_icon_from_wnck(const ProcInfo &info)
Glib::RefPtr<Gdk::Pixbuf>
PrettyTable::get_icon_from_name(const ProcInfo &info)
{
return this->theme->load_icon(info.name, APP_ICON_SIZE, Gtk::ICON_LOOKUP_USE_BUILTIN);
return this->theme->load_icon(info.name, APP_ICON_SIZE, Gtk::ICON_LOOKUP_USE_BUILTIN | Gtk::ICON_LOOKUP_FORCE_SIZE);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment