[gtk+] gtkwindow: Optimize GtkStyleContext usage
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtkwindow: Optimize GtkStyleContext usage
- Date: Tue, 25 Nov 2014 19:09:01 +0000 (UTC)
commit 2cd835c0765e80ac1981a60f4641747a5e32177d
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Nov 25 11:05:36 2014 -0800
gtkwindow: Optimize GtkStyleContext usage
gtk/gtkwindow.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index c01a47e..62a7caa 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -6431,13 +6431,14 @@ get_shadow_width (GtkWidget *widget,
else
s = state | GTK_STATE_FLAG_BACKDROP;
+ gtk_style_context_set_state (context, s);
+
/* Always sum border + padding */
gtk_style_context_get_border (context, s, &border);
gtk_style_context_get_padding (context, s, &d);
sum_borders (&d, &border);
/* Calculate the size of the drop shadows ... */
- gtk_style_context_set_state (context, s);
shadows = _gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_BOX_SHADOW);
_gtk_css_shadows_value_get_extents (shadows, &border);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]