diff options
author | Matthias Clasen <mclasen@redhat.com> | 2016-02-15 10:38:13 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2016-02-15 10:38:13 -0500 |
commit | cb43af090b175a7afef20d3511d12594120cef34 (patch) | |
tree | 82d47c06102627bbd0ffd1fc9652dfa015e4796b /gtk/gtknotebook.c | |
parent | 1d65e8b601afbdb5b6ce4586dbe5ceba6453a350 (diff) | |
download | gtk+-cb43af090b175a7afef20d3511d12594120cef34.tar.gz |
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.
Diffstat (limited to 'gtk/gtknotebook.c')
-rw-r--r-- | gtk/gtknotebook.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index 6f9fafce56..6c12dae779 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -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)); } |