notebook: Query the right node's padding

This commit is contained in:
Benjamin Otte 2015-11-06 18:52:13 +01:00
parent 37b4b60e91
commit 2a1a483ede

View File

@ -6176,10 +6176,11 @@ gtk_notebook_calculate_tabs_allocation (GtkNotebook *notebook,
* see gtk_notebook_page_allocate(). * see gtk_notebook_page_allocate().
*/ */
gtk_style_context_save_to_node (context, page->cssnode); 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_save_to_node (context, priv->cur_page->cssnode);
gtk_style_context_get_padding (context, GTK_STATE_FLAG_NORMAL, &normal_padding); gtk_style_context_get_padding (context, gtk_style_context_get_state (context), &active_padding);
gtk_style_context_restore (context); gtk_style_context_restore (context);
padding.top = MAX (0, active_padding.top - normal_padding.top); padding.top = MAX (0, active_padding.top - normal_padding.top);