Commit 51e0d795 authored by Adrien Plazas's avatar Adrien Plazas

Gtk+: Add a note about ellipsized labels in leaflets

Fixes Librem5/libhandy#63
parent 14c0a50b
Pipeline #3679 passed with stage
in 11 minutes and 6 seconds
......@@ -48,6 +48,8 @@ Allowing your label to ellipsize will cut a part of your string when there isn't
.. note:: If you allow your label to be elipsized, make sure that its `xalign property <GtkLabel xalign property_>`_ matches its justification or your label may not be properly aligned when ellipsized: 0 for left, 1 for right, or 0.5 for center.
.. note:: If an ellipized label has an HdyLeaflet_ for ancestor and you want the label to be ellipsized before the leaflet folds itself, try wrapping your label in a GtkScrolledWindow_, optionally expanding the scrolled window horizontally. Don't worry, it won't surround your label with scrollbars but just trick the sizing system into doing what you expected it to do.
Letting your label wrap will preserve the integrity of the text at the expense of more height, you can enable it with the `GtkLabel wrap property`_ and choose how to wrap with the `GtkLabel wrap-mode property`_.
.. note:: By allowing the label to wrap, it will always request enough height when fully wrapped. Consider putting your label or a widget containing it into a scrollable window to avoid height becoming a problem.
......
......@@ -22,6 +22,7 @@
.. _GtkLabel wrap property : https://developer.gnome.org/gtk3/stable/GtkLabel.html#GtkLabel--wrap
.. _GtkLabel xalign property : https://developer.gnome.org/gtk3/stable/GtkLabel.html#GtkLabel--xalign
.. _GtkSeparator : https://developer.gnome.org/gtk3/stable/GtkSeparator.html
.. _GtkScrolledWindow : https://developer.gnome.org/gtk3/stable/GtkScrolledWindow.html
.. _GtkSizeGroup : https://developer.gnome.org/gtk3/stable/GtkSizeGroup.html
.. _`GTK+ toolkit`: https://www.gtk.org
.. _`GTK+ website`: https://www.gtk.org/
......
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