projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
18482ac
)
text: Make the placeholder non-intrusive
author
Matthias Clasen
<mclasen@redhat.com>
Mon, 5 Jun 2023 01:45:59 +0000
(21:45 -0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Mon, 5 Jun 2023 12:06:46 +0000
(08:06 -0400)
We never want to let the placeholder cause
the widget to grow, so set its max-width-chars
to a small value to make it ellipsize.
gtk/gtktext.c
patch
|
blob
|
history
diff --git
a/gtk/gtktext.c
b/gtk/gtktext.c
index c7316478e7536c6814ef1f700fa26feacde2e261..1d78362b989a92ebece6fe7eaf2cbeab6088e968 100644
(file)
--- a/
gtk/gtktext.c
+++ b/
gtk/gtktext.c
@@
-6717,6
+6717,7
@@
gtk_text_set_placeholder_text (GtkText *self,
"css-name", "placeholder",
"xalign", priv->xalign,
"ellipsize", PANGO_ELLIPSIZE_END,
+ "max-width-chars", 3,
NULL);
gtk_label_set_attributes (GTK_LABEL (priv->placeholder), priv->attrs);
gtk_widget_insert_after (priv->placeholder, GTK_WIDGET (self), NULL);