mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 14:31:10 +00:00
text: Make the placeholder non-intrusive
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.
This commit is contained in:
parent
fd5d15004e
commit
419c431f29
@ -6725,6 +6725,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);
|
||||
|
Loading…
Reference in New Issue
Block a user