Commit 0e93da9b authored by Adrien Plazas's avatar Adrien Plazas

Gtk+: Add a note about ellipsized labels in leaflets

Fixes Librem5/libhandy#63
parent 14c0a50b
Pipeline #3690 passed with stage
in 9 minutes and 35 seconds
...@@ -46,7 +46,9 @@ A GtkLabel_ can prevent your application's UI from reaching really small sizes, ...@@ -46,7 +46,9 @@ A GtkLabel_ can prevent your application's UI from reaching really small sizes,
Allowing your label to ellipsize will cut a part of your string when there isn't enough space for it, you can enable it and choose which part will be cut with the `GtkLabel ellipize property`_. Use it if you really need your label to be on a single line. Allowing your label to ellipsize will cut a part of your string when there isn't enough space for it, you can enable it and choose which part will be cut with the `GtkLabel ellipize property`_. Use it if you really need your label to be on a single line.
.. 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 you allow your label to be ellipsized, 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 ellipsized 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`_. 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`_.
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
.. _GtkLabel wrap property : https://developer.gnome.org/gtk3/stable/GtkLabel.html#GtkLabel--wrap .. _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 .. _GtkLabel xalign property : https://developer.gnome.org/gtk3/stable/GtkLabel.html#GtkLabel--xalign
.. _GtkSeparator : https://developer.gnome.org/gtk3/stable/GtkSeparator.html .. _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 .. _GtkSizeGroup : https://developer.gnome.org/gtk3/stable/GtkSizeGroup.html
.. _`GTK+ toolkit`: https://www.gtk.org .. _`GTK+ toolkit`: https://www.gtk.org
.. _`GTK+ website`: 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