projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
86175f0
)
label: Don't add a pixel where none should be added
author
Benjamin Otte
<otte@redhat.com>
Thu, 18 Nov 2021 06:54:16 +0000
(07:54 +0100)
committer
Benjamin Otte
<otte.benjamin@googlemail.com>
Thu, 18 Nov 2021 07:16:09 +0000
(07:16 +0000)
When the text width is larger than the measuring width, set the min
width to that value, don't also add 1 to it.
gtk/gtklabel.c
patch
|
blob
|
history
diff --git
a/gtk/gtklabel.c
b/gtk/gtklabel.c
index 41041b3a9eacb06acf83db17bad5822d6dbad235..11ebad9c2d976aeef63eb2b22c4867fc2d465df8 100644
(file)
--- a/
gtk/gtklabel.c
+++ b/
gtk/gtklabel.c
@@
-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;