Commit 40520cef authored by Heather Ellsworth's avatar Heather Ellsworth

Merge branch 'libhandy-0-0-3' into 'master'

GTK+: Limit the documentation to libhandy 0.0.3

See merge request Librem5/developer.puri.sm!55
parents bb89bdce d596c1e6
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
.. _application menu example application : https://source.puri.sm/Librem5/purism-gtk-3-examples/tree/app-menu .. _application menu example application : https://source.puri.sm/Librem5/purism-gtk-3-examples/tree/app-menu
.. _adaptive labels example application : https://source.puri.sm/Librem5/purism-gtk-3-examples/tree/adaptive-labels .. _adaptive labels example application : https://source.puri.sm/Librem5/purism-gtk-3-examples/tree/adaptive-labels
.. _adaptive grid layout example application : https://source.puri.sm/Librem5/purism-gtk-3-examples/tree/adaptive-grid-layout .. _adaptive grid layout example application : https://source.puri.sm/Librem5/purism-gtk-3-examples/tree/adaptive-grid-layout-0-0-3
.. _GtkHeaderBar : https://developer.gnome.org/gtk3/stable/GtkHeaderBar.html .. _GtkHeaderBar : https://developer.gnome.org/gtk3/stable/GtkHeaderBar.html
.. _GtkLabel : https://developer.gnome.org/gtk3/stable/GtkLabel.html .. _GtkLabel : https://developer.gnome.org/gtk3/stable/GtkLabel.html
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
.. _GtkSeparator : https://developer.gnome.org/gtk3/stable/GtkSeparator.html .. _GtkSeparator : https://developer.gnome.org/gtk3/stable/GtkSeparator.html
.. _GtkSizeGroup : https://developer.gnome.org/gtk3/stable/GtkSizeGroup.html .. _GtkSizeGroup : https://developer.gnome.org/gtk3/stable/GtkSizeGroup.html
.. _HdyHeaderGroup : https://honk.sigxcpu.org/projects/libhandy/doc/HdyHeaderGroup.html
.. _HdyLeaflet : https://honk.sigxcpu.org/projects/libhandy/doc/HdyLeaflet.html .. _HdyLeaflet : https://honk.sigxcpu.org/projects/libhandy/doc/HdyLeaflet.html
.. _HdyTitleBar : https://honk.sigxcpu.org/projects/libhandy/doc/HdyTitleBar.html .. _HdyTitleBar : https://honk.sigxcpu.org/projects/libhandy/doc/HdyTitleBar.html
...@@ -32,6 +31,8 @@ GTK+ ...@@ -32,6 +31,8 @@ GTK+
.. note:: From now on, this section assumes you are familiar with the basics of GTK+ application development. .. note:: From now on, this section assumes you are familiar with the basics of GTK+ application development.
.. note:: This section assumes you are using GTK+ 3.24.1 or newer and libhandy 0.0.3 or newer as these versions received improvements required for adaptive apps to function properly.
The GTK+ Inspector The GTK+ Inspector
------------------ ------------------
...@@ -78,7 +79,6 @@ HdyTitleBar_ is a simple container that takes care of the look of the title bar. ...@@ -78,7 +79,6 @@ HdyTitleBar_ is a simple container that takes care of the look of the title bar.
It is a very convenient widget as it allows header bars to look good when animated by ensuring they don't draw the title bar's background themselves, which is a requirement for adaptive apps, and it simplifies common operations like setting the selection mode a lot. It is a very convenient widget as it allows header bars to look good when animated by ensuring they don't draw the title bar's background themselves, which is a requirement for adaptive apps, and it simplifies common operations like setting the selection mode a lot.
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. 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 headerbars 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 some order they appear in the title bar.
Here is an simple `GtkBuilder` example showing this section's advises: Here is an simple `GtkBuilder` example showing this section's advises:
...@@ -113,12 +113,6 @@ Here is an simple `GtkBuilder` example showing this section's advises: ...@@ -113,12 +113,6 @@ Here is an simple `GtkBuilder` example showing this section's advises:
</object> </object>
</child> </child>
</object> </object>
<object class="HdyHeaderGroup">
<headerbars>
<headerbar name="start_header"/>
<headerbar name="end_header"/>
</headerbars>
</object>
</interface> </interface>
Selection Mode Selection Mode
...@@ -138,7 +132,6 @@ The basic layout: ...@@ -138,7 +132,6 @@ The basic layout:
* In the title bar put a HdyTitleBar_, put a HdyLeaflet_ in it in which you will put your sidebar's GtkHeaderBar_, a GtkSeparator_ and your content's GtkHeaderBar_. * In the title bar put a HdyTitleBar_, put a HdyLeaflet_ in it in which you will put your sidebar's GtkHeaderBar_, a GtkSeparator_ and your content's GtkHeaderBar_.
* In the window put a HdyLeaflet_ in which you will put your sidebar widget, a GtkSeparator_ and your content widget. * In the window put a HdyLeaflet_ in which you will put your sidebar widget, a GtkSeparator_ and your content widget.
* Add the `sidebar` style class to the separators from the titelbar and the window. * Add the `sidebar` style class to the separators from the titelbar and the window.
* Put your header bars in the same order into a HdyHeaderGroup_.
* Make the close buttons of your header bars visible. * Make the close buttons of your header bars visible.
Make it a grid: Make it a grid:
...@@ -165,4 +158,4 @@ Navigate in the layout: ...@@ -165,4 +158,4 @@ Navigate in the layout:
:height: 300px :height: 300px
:align: center :align: center
To help you implement these, we created an `example application <adaptive grid layout example application_>`_, just clone it in :ref:`gbuilder` and check the ``adaptive-grid-layout`` branch out. To help you implement these, we created an `example application <adaptive grid layout example application_>`_, just clone it in :ref:`gbuilder` and check the ``adaptive-grid-layout-0-0-3`` branch out.
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