forked from AuroraMiddleware/gtk
label: Don't add a pixel where none should be added
When the text width is larger than the measuring width, set the min width to that value, don't also add 1 to it.
This commit is contained in:
parent
86175f043c
commit
899cb44519
@ -1201,7 +1201,7 @@ get_width_for_height (GtkLabel *self,
|
||||
text_width = PANGO_PIXELS_CEIL (text_width);
|
||||
if (text_width > mid)
|
||||
min = mid = text_width;
|
||||
if (text_height > height)
|
||||
else if (text_height > height)
|
||||
min = mid + 1;
|
||||
else
|
||||
max = mid;
|
||||
|
Loading…
Reference in New Issue
Block a user