Commit adb8f732 authored by David Boddie's avatar David Boddie Committed by rhn

Tidy up the GTK+ page

Moving the inline XML into a separate file.
parent d894eaa4
.. _gtk+:
.. note:: New advice on adaptive GTK+ applications development are regularly documented on this page, don't hesitate to visit it regularly.
.. note:: New advice on adaptive GTK+ applications development are regularly
documented on this page.
GTK+
====
......@@ -64,46 +65,9 @@ It is a very convenient widget as it allows header bars to look good when animat
Some title bars are composed of multiple header bars, in such a case it is advised to separate them with a GtkSeparator_ with the `sidebar` style class.
To help spreading the window decoration across all header bars as if they were only one, just show the close button on all of your header bars and put them into a HdyHeaderGroup_ in the same order they appear in the title bar.
Here is an simple `GtkBuilder` example showing this section's advises:
.. code:: xml
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<child type="titlebar">
<object class="HdyTitleBar">
<child>
<object class="GtkBox">
<child>
<object class="GtkHeaderBar" id="start_header">
<property name="show-close-button">True</property>
</object>
</child>
<child>
<object class="GtkSeparator">
<style>
<class name="sidebar"/>
</style>
</object>
</child>
<child>
<object class="GtkHeaderBar" id="end_header">
<property name="show-close-button">True</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
<object class="HdyHeaderGroup">
<headerbars>
<headerbar name="start_header"/>
<headerbar name="end_header"/>
</headerbars>
</object>
</interface>
Here is an simple `GtkBuilder` example showing this section's advice:
.. literalinclude:: /Apps/_files/window.ui
Selection Mode
--------------
......
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkWindow">
<child type="titlebar">
<object class="HdyTitleBar">
<child>
<object class="GtkBox">
<child>
<object class="GtkHeaderBar" id="start_header">
<property name="show-close-button">True</property>
</object>
</child>
<child>
<object class="GtkSeparator">
<style>
<class name="sidebar"/>
</style>
</object>
</child>
<child>
<object class="GtkHeaderBar" id="end_header">
<property name="show-close-button">True</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
<object class="HdyHeaderGroup">
<headerbars>
<headerbar name="start_header"/>
<headerbar name="end_header"/>
</headerbars>
</object>
</interface>
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