[gnome-system-monitor] Ensure icons are at the right size



commit 5480731230f9c6849fbf0aea1288b18bc9e62480
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Oct 13 11:24:04 2014 -0400

    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

 src/prettytable.cpp |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/prettytable.cpp b/src/prettytable.cpp
index a4207e4..f4fe716 100644
--- a/src/prettytable.cpp
+++ b/src/prettytable.cpp
@@ -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);
 }
 
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]