summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2015-11-06 18:52:13 +0100
committerBenjamin Otte <otte@redhat.com>2015-11-06 18:59:15 +0100
commit2a1a483edef1c94a795855dec08d91a4421ceb13 (patch)
treeb4abb21a93963472aad159a58b993f1b38901f29
parent37b4b60e9127b3604994f92b5d2715ba2a310597 (diff)
downloadgtk+-2a1a483edef1c94a795855dec08d91a4421ceb13.tar.gz
notebook: Query the right node's padding
-rw-r--r--gtk/gtknotebook.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 52d3dd3800..f7e5ff9a8e 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -6176,10 +6176,11 @@ gtk_notebook_calculate_tabs_allocation (GtkNotebook *notebook,
* see gtk_notebook_page_allocate().
*/
gtk_style_context_save_to_node (context, page->cssnode);
+ gtk_style_context_get_padding (context, gtk_style_context_get_state (context), &active_padding);
+ gtk_style_context_restore (context);
- gtk_style_context_get_padding (context, GTK_STATE_FLAG_ACTIVE, &active_padding);
- gtk_style_context_get_padding (context, GTK_STATE_FLAG_NORMAL, &normal_padding);
-
+ gtk_style_context_save_to_node (context, priv->cur_page->cssnode);
+ gtk_style_context_get_padding (context, gtk_style_context_get_state (context), &active_padding);
gtk_style_context_restore (context);
padding.top = MAX (0, active_padding.top - normal_padding.top);