summaryrefslogtreecommitdiff
path: root/gtk/ui/gtktooltipwindow.ui
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2023-01-28 13:04:01 -0500
committerMatthias Clasen <mclasen@redhat.com>2023-01-28 13:06:30 -0500
commitdce21f06ddbab1cdbd25621897df32b472fd72c7 (patch)
treebd6a632a8765e8f26c406954d989f1f1718abff3 /gtk/ui/gtktooltipwindow.ui
parent56c1c4152f41c625f09937ee60098e1a3dfe3ba4 (diff)
downloadgtk+-dce21f06ddbab1cdbd25621897df32b472fd72c7.tar.gz
tooltip: Don't play games with max-width-chars
Setting max-width-chars to the number of characters in the string works ok only as long as the average char width we get from Pango matches reality. Sadly that seems not always the case, and this code was causing short Chinese tooltips to always be broken into two lines. Fixes: #4470
Diffstat (limited to 'gtk/ui/gtktooltipwindow.ui')
-rw-r--r--gtk/ui/gtktooltipwindow.ui1
1 files changed, 1 insertions, 0 deletions
diff --git a/gtk/ui/gtktooltipwindow.ui b/gtk/ui/gtktooltipwindow.ui
index 127fa045e4..2cecd58c73 100644
--- a/gtk/ui/gtktooltipwindow.ui
+++ b/gtk/ui/gtktooltipwindow.ui
@@ -14,6 +14,7 @@
<child>
<object class="GtkLabel" id="label">
<property name="wrap">1</property>
+ <property name="max-width-chars">50</property>
</object>
</child>
</object>