mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-11 11:20:12 +00:00
notebook: Fix a misplaced tab label
Sometimes default tab labels ("Page <n>") get created on-demand, and in that case, we were forgetting to put them below the tab node in the CSS node tree. The visible result of this is that the heuristics for when to give notebooks background in Adwaita fail in some cases. So, make sure to always place the label below the tab node.
This commit is contained in:
parent
1d65e8b601
commit
cb43af090b
@ -5078,6 +5078,8 @@ gtk_notebook_update_labels (GtkNotebook *notebook)
|
||||
if (!page->tab_label)
|
||||
{
|
||||
page->tab_label = gtk_label_new (string);
|
||||
gtk_css_node_set_parent (gtk_widget_get_css_node (page->tab_label),
|
||||
gtk_css_gadget_get_node (page->gadget));
|
||||
gtk_widget_set_parent (page->tab_label,
|
||||
GTK_WIDGET (notebook));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user