From: Timm Bäder Date: Sun, 20 Oct 2019 06:43:50 +0000 (+0200) Subject: text: Propagate pango attributes to placeholder X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1^2~18^2~20^2~678 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=dfcc40ef9a5963130fa9ab0a114817a47c5e20fd;p=gtk4.git text: Propagate pango attributes to placeholder Not sure if this is really always wanted or whether we need to filter the attributes, or even create a separate property for them. --- diff --git a/gtk/gtktext.c b/gtk/gtktext.c index f4b15872b1..698b1421eb 100644 --- a/gtk/gtktext.c +++ b/gtk/gtktext.c @@ -6467,6 +6467,7 @@ gtk_text_set_placeholder_text (GtkText *self, "xalign", 0.0f, "ellipsize", PANGO_ELLIPSIZE_END, NULL); + gtk_label_set_attributes (GTK_LABEL (priv->placeholder), priv->attrs); gtk_widget_insert_after (priv->placeholder, GTK_WIDGET (self), NULL); } else @@ -6621,6 +6622,9 @@ gtk_text_set_attributes (GtkText *self, pango_attr_list_unref (priv->attrs); priv->attrs = attrs; + if (priv->placeholder) + gtk_label_set_attributes (GTK_LABEL (priv->placeholder), attrs); + g_object_notify_by_pspec (G_OBJECT (self), text_props[PROP_ATTRIBUTES]); gtk_text_recompute (self);