GtkLabel:width-chars and max-width-chars don't behave as documented for ellipsized labels
@debarshir
Submitted by Debarshi Ray Link to original bug (#769660)
Description
The text layout section (ie. #label-text-layout) says:
- The #GtkLabel:width-chars and #GtkLabel:max-width-chars properties
- can be used to control the size allocation of ellipsized or wrapped
- labels. For ellipsizing labels, if either is specified (and less
- than the actual text size), it is used as the minimum width, and the actual
- text size is used as the natural width of the label.
However, the code and comments inside gtk_label_get_preferred_layout_size don't match that. For ellipsized labels:
(i) GtkLabel:width-chars is always the minimum size, regardless of whether it is less than the actual text size or not.
(ii) GtkLabel:max-width-chars is the natural size, not minimum size.