gtk/tests/testsplitheaders.ui
Matthias Clasen d28ca4cdce Add an example for split headers
This shows how to deal with variability in window decorations
with split header bars.
2014-01-06 10:32:19 -05:00

175 lines
6.5 KiB
XML

<interface>
<object class="GtkWindow" id="window">
<property name="default-width">600</property>
<property name="default-height">400</property>
<property name="icon-name">preferences-desktop-font</property>
<child type="titlebar">
<object class="GtkBox">
<property name="visible">True</property>
<property name="orientation">horizontal</property>
<child>
<object class="GtkHeaderBar" id="sidebar-header">
<property name="visible">True</property>
<child>
<object class="GtkCheckButton">
<property name="visible">True</property>
<property name="valign">center</property>
</object>
<packing>
<property name="pack-type">end</property>
</packing>
</child>
</object>
</child>
<child>
<object class="GtkSeparator">
<property name="visible">True</property>
</object>
</child>
<child>
<object class="GtkHeaderBar" id="main-header">
<property name="visible">True</property>
<property name="hexpand">True</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="orientation">horizontal</property>
<style>
<class name="linked"/>
</style>
<child>
<object class="GtkButton">
<property name="visible">True</property>
<property name="label">&lt;</property>
<property name="valign">center</property>
</object>
</child>
<child>
<object class="GtkButton">
<property name="visible">True</property>
<property name="label">&gt;</property>
<property name="valign">center</property>
</object>
</child>
</object>
<packing>
<property name="pack-type">start</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="orientation">horizontal</property>
<child>
<object class="GtkListBox" id="sidebar-content">
<property name="visible">True</property>
<property name="selection-mode">none</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="label">Bla</property>
<property name="xalign">0</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="label">Bla bla</property>
<property name="xalign">0</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="label">Bla bla bla</property>
<property name="xalign">0</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="label">Bla bla bla bla</property>
<property name="xalign">0</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkScrolledWindow" id="main-content">
<property name="visible">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="hscrollbar-policy">always</property>
<property name="vscrollbar-policy">always</property>
<child>
<object class="GtkGrid">
<property name="visible">True</property>
<property name="margin">20</property>
<property name="row-spacing">10</property>
<property name="column-spacing">10</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="label">Layout</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="layout-entry">
<property name="visible">True</property>
<property name="width-chars">25</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="label">Decorations</property>
</object>
<packing>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="decorations">
<property name="visible">True</property>
</object>
<packing>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
<object class="GtkSizeGroup">
<property name="mode">horizontal</property>
<widgets>
<widget name="sidebar-header"/>
<widget name="sidebar-content"/>
</widgets>
</object>
<object class="GtkSizeGroup">
<property name="mode">horizontal</property>
<widgets>
<widget name="main-header"/>
<widget name="main-content"/>
</widgets>
</object>
</interface>