Commit c310c0a0 authored by Adrien Plazas's avatar Adrien Plazas

Gtk+: Add a note about ellipsized labels in leaflets

Fixes Librem5/libhandy#63
parent 14c0a50b
Pipeline #3678 passed with stage
in 10 minutes and 53 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.
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