[gtk+] gtkcellarea: Optimize GtkStyleContext usage
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtkcellarea: Optimize GtkStyleContext usage
- Date: Tue, 25 Nov 2014 19:09:11 +0000 (UTC)
commit d21dc0d91c1b5004affbb8e468f604b64ff80666
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Nov 25 11:05:57 2014 -0800
gtkcellarea: Optimize GtkStyleContext usage
This is a bit bizarre, but the cell renderer can apply different
flags from the actual style context, and we should use those instead
of the widget flags.
gtk/gtkcellarea.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkcellarea.c b/gtk/gtkcellarea.c
index eb82de3..1ce312a 100644
--- a/gtk/gtkcellarea.c
+++ b/gtk/gtkcellarea.c
@@ -3561,7 +3561,7 @@ gtk_cell_area_inner_cell_area (GtkCellArea *area,
g_return_if_fail (inner_area != NULL);
context = gtk_widget_get_style_context (widget);
- state = gtk_widget_get_state_flags (widget);
+ state = gtk_style_context_get_state (context);
gtk_style_context_get_padding (context, state, &border);
*inner_area = *cell_area;
@@ -3611,7 +3611,7 @@ gtk_cell_area_request_renderer (GtkCellArea *area,
g_return_if_fail (natural_size != NULL);
context = gtk_widget_get_style_context (widget);
- state = gtk_widget_get_state_flags (widget);
+ state = gtk_style_context_get_state (context);
gtk_style_context_get_padding (context, state, &border);
if (orientation == GTK_ORIENTATION_HORIZONTAL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]