[gthumb/gthumb-3-4] preserve the style context using save and restore
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb/gthumb-3-4] preserve the style context using save and restore
- Date: Wed, 6 Apr 2016 13:23:18 +0000 (UTC)
commit ef75d4e3dd847481b7421eb4062b33e495261894
Author: Paolo Bacchilega <paobac src gnome org>
Date: Wed Apr 6 15:19:30 2016 +0200
preserve the style context using save and restore
gthumb/gth-grid-view.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gthumb/gth-grid-view.c b/gthumb/gth-grid-view.c
index 75aa72b..16e6a39 100644
--- a/gthumb/gth-grid-view.c
+++ b/gthumb/gth-grid-view.c
@@ -1505,8 +1505,9 @@ _gth_grid_view_item_draw_caption (GthGridViewItem *item,
return;
cairo_save (cr);
-
style_context = gtk_widget_get_style_context (widget);
+ gtk_style_context_save (style_context);
+
gtk_style_context_get_color (style_context, item_state, &color);
gdk_cairo_set_source_rgba (cr, &color);
cairo_move_to (cr, item->caption_area.x, item->caption_area.y + grid_view->priv->caption_padding);
@@ -1521,6 +1522,7 @@ _gth_grid_view_item_draw_caption (GthGridViewItem *item,
item->caption_area.width,
item->caption_area.height);
+ gtk_style_context_restore (style_context);
cairo_restore (cr);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]