Commit bd1ca56c authored by Christian Hergert's avatar Christian Hergert Committed by Christian Hergert
Browse files

workbench: move headerbar into a stack

We will still have some perspectives that require their own headerbar, so
we need to maintain a stack for that.
parent b39ddbb0
......@@ -43,6 +43,7 @@ struct _IdeWorkbench
*/
GListStore *perspectives;
GtkStack *header_stack;
IdeWorkbenchHeaderBar *header_bar;
IdePerspectiveMenuButton *perspective_menu_button;
GtkStack *perspectives_stack;
......
......@@ -367,6 +367,7 @@ ide_workbench_class_init (IdeWorkbenchClass *klass)
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/builder/ui/ide-workbench.ui");
gtk_widget_class_bind_template_child (widget_class, IdeWorkbench, header_bar);
gtk_widget_class_bind_template_child (widget_class, IdeWorkbench, header_size_group);
gtk_widget_class_bind_template_child (widget_class, IdeWorkbench, header_stack);
gtk_widget_class_bind_template_child (widget_class, IdeWorkbench, perspective_menu_button);
gtk_widget_class_bind_template_child (widget_class, IdeWorkbench, perspectives_stack);
}
......
......@@ -3,18 +3,23 @@
<!-- interface-requires gtk+ 3.21 -->
<template class="IdeWorkbench" parent="GtkApplicationWindow">
<child type="titlebar">
<object class="IdeWorkbenchHeaderBar" id="header_bar">
<object class="GtkStack" id="header_stack">
<property name="visible">true</property>
<child internal-child="left">
<object class="EggPriorityBox">
<child>
<object class="IdePerspectiveMenuButton" id="perspective_menu_button">
<property name="stack">perspectives_stack</property>
<property name="visible">false</property>
<child>
<object class="IdeWorkbenchHeaderBar" id="header_bar">
<property name="visible">true</property>
<child internal-child="left">
<object class="EggPriorityBox">
<child>
<object class="IdePerspectiveMenuButton" id="perspective_menu_button">
<property name="stack">perspectives_stack</property>
<property name="visible">false</property>
</object>
<packing>
<property name="priority">-100000</property>
</packing>
</child>
</object>
<packing>
<property name="priority">-100000</property>
</packing>
</child>
</object>
</child>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment