Commit 032ec8fd authored by Adrien Plazas's avatar Adrien Plazas

GTK+: Update the titlebar related sections

Replace the Header Bar and Separators section by the Title Bar section
and the Selection Mode section.

These explain how to handle these UI elements in a simpler and better
way, taking recent improvements to GTK+ and libhandy into accounts.
parent 7ec0283c
Pipeline #1166 passed with stage
in 44 seconds
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
.. _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
.. _HdyTitleBar : https://honk.sigxcpu.org/projects/libhandy/doc/HdyTitleBar.html .. _HdyTitleBar : https://honk.sigxcpu.org/projects/libhandy/doc/HdyTitleBar.html
GTK+ GTK+
...@@ -76,6 +77,7 @@ HdyTitleBar_ is a simple container that takes care of the look of the title bar. ...@@ -76,6 +77,7 @@ 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:
...@@ -110,6 +112,12 @@ Here is an simple `GtkBuilder` example showing this section's advises: ...@@ -110,6 +112,12 @@ 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
......
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