Commit ccd53071 authored by Adrien Plazas's avatar Adrien Plazas

Add the GTK+ section

parent 19029889
Pipeline #1124 passed with stage
in 42 seconds
......@@ -69,6 +69,9 @@ Header Bars and Separators
A GtkHeaderBar_ is meant to be used as a window's title bar, typically presenting to the user the application's title, various controls and a `close` button.
TODO: show-close-button, use it, but only on the final header bar
TODO: how to handle platforms with window controls on the left side?
Some applications want to split their header bar into two or more pieces, a typical way to implement this is by having a `GtkBox` containing two header bars separated by a `GtkSeparator` as you title bar.
.. note:: There currently is a bug in GTK+ 3 that `may` make a separator in a title bar appear black. You can fix this with the following custom style:
......@@ -92,3 +95,45 @@ Some applications have a grid layout where several panels sit side-by-side and e
.. note:: You will have to horizontally expand at least one column to avoid having unused window space, which would look particularly ugly in the title bar.
To help you implement these, we created an `example application <grid layout example application_>`_, just clone it in :ref:`gbuilder` and check the ``grid-layout`` branch out.
Explicit Size Requests
----------------------
Be extremely careful when setting explicit width or height requests, these could prevent your application to reach tiny sizes!
- https://developer.gnome.org/gtk3/stable/GtkWidget.html#GtkWidget--width-requests
- https://developer.gnome.org/gtk3/stable/GtkWidget.html#GtkWidget--height-request
GtkStack
--------
As part of your UI don't hesitate to use a GtkStack!
TODO: add a link to an extremely simple example project to clone.
HdyLeaflet
----------
If your desktop UI design requires a sidebar, consider using HdyLeaflet: it behaves like a box in which you can put your sidebar and your content side by side, but it will automatically fold itself and act like Gtkstack when there isn't enough space, letting your UI adapt to small screens despite the sidebar.
TODO: add a link to an extremely simple example project to clone.
TODO: Keep in mind that when the header bar is folded the final header bar could change and so could the one with the close button
TODO: Making adaptive title bars:
- using a leaflet
- binding the column widths
- using separators
HdyColumn
---------
An adaptive application should remain readable and usable on large sizes to! You can use HdyColumn to let your applications reach very small sizes but to constrain them to some width to ensure readability on large sizes.
Show All is Harmful
-------------------
TODO: Presentation de la méthode
TODO: why is it harmful
TODO: no-show-all property is good but not enough (be carefull on top level props)
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