window: Keep titlebar after main child

Fixes #2949
This commit is contained in:
Timm Bäder 2020-08-01 09:30:48 +02:00
parent ebaea07286
commit 547842e7f0
2 changed files with 9 additions and 9 deletions

View File

@ -132,8 +132,8 @@
*
* |[<!-- language="plain" -->
* window.background
* <titlebar child>.titlebar [.default-decoration]
* <child>
* <child>
* <titlebar child>.titlebar [.default-decoration]
* ]|
*
* GtkWindow has a main CSS node with name window and style class .background.
@ -2824,7 +2824,7 @@ gtk_window_set_titlebar (GtkWindow *window,
gtk_window_enable_csd (window);
priv->title_box = titlebar;
gtk_widget_insert_after (priv->title_box, widget, NULL);
gtk_widget_insert_before (priv->title_box, widget, NULL);
gtk_widget_add_css_class (titlebar, GTK_STYLE_CLASS_TITLEBAR);
@ -4308,7 +4308,7 @@ gtk_window_realize (GtkWidget *widget)
gtk_widget_add_css_class (priv->titlebar, GTK_STYLE_CLASS_TITLEBAR);
gtk_widget_add_css_class (priv->titlebar, "default-decoration");
gtk_widget_insert_after (priv->titlebar, widget, NULL);
gtk_widget_insert_before (priv->titlebar, widget, NULL);
priv->title_box = priv->titlebar;
}
@ -7084,7 +7084,7 @@ gtk_window_set_child (GtkWindow *window,
if (child)
{
priv->child = child;
gtk_widget_set_parent (child, GTK_WIDGET (window));
gtk_widget_insert_before (child, GTK_WIDGET (window), priv->title_box);
}
g_object_notify_by_pspec (G_OBJECT (window), window_props[PROP_CHILD]);

View File

@ -1,4 +1,8 @@
window.background.csd:dir(ltr)
stack:dir(ltr)
box.horizontal:dir(ltr)
box.horizontal:dir(ltr)
box.horizontal:dir(ltr)
headerbar.titlebar:dir(ltr)
windowhandle:dir(ltr)
box:dir(ltr)
@ -15,7 +19,3 @@ window.background.csd:dir(ltr)
button.text-button.toggle:dir(ltr)
label:dir(ltr)
box.end.horizontal:dir(ltr)
stack:dir(ltr)
box.horizontal:dir(ltr)
box.horizontal:dir(ltr)
box.horizontal:dir(ltr)