[gtk+/places-sidebar] Replace eel_create_spotlight_pixbuf()
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/places-sidebar] Replace eel_create_spotlight_pixbuf()
- Date: Wed, 5 Oct 2011 20:18:52 +0000 (UTC)
commit 2049e8ad0527850164e9a67921c2424cbaef47e2
Author: Federico Mena Quintero <federico gnome org>
Date: Wed Oct 5 07:26:26 2011 -0500
Replace eel_create_spotlight_pixbuf()
We use the normal gtk_style_context_set_state() machinery to set a
prelighted state. Hopefully even symbolic icons will be rendered
prelighted properly.
Signed-off-by: Federico Mena Quintero <federico gnome org>
gtk/gtkplacessidebar.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c
index 44962d6..34dfcb1 100644
--- a/gtk/gtkplacessidebar.c
+++ b/gtk/gtkplacessidebar.c
@@ -274,17 +274,18 @@ get_eject_icon (GtkPlacesSidebar *sidebar,
icon_info = gtk_icon_theme_lookup_by_gicon (icon_theme, icon, icon_size, 0);
style = gtk_widget_get_style_context (GTK_WIDGET (sidebar));
+
+ gtk_style_context_save (style);
+
+ if (highlighted)
+ gtk_style_context_set_state (style, GTK_STATE_FLAG_PRELIGHT);
+
eject = gtk_icon_info_load_symbolic_for_context (icon_info,
style,
NULL,
NULL);
- if (highlighted) {
- GdkPixbuf *high;
- high = eel_create_spotlight_pixbuf (eject);
- g_object_unref (eject);
- eject = high;
- }
+ gtk_style_context_restore (context);
g_object_unref (icon);
gtk_icon_info_free (icon_info);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]