diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 398f1ecb4d..90b832009a 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -5377,31 +5377,19 @@ static GtkWidget * create_titlebar (GtkWindow *window) { GtkWindowPrivate *priv = window->priv; - GtkWidget *label; GtkWidget *titlebar; GtkStyleContext *context; - gchar *title; titlebar = gtk_header_bar_new (); g_object_set (titlebar, "spacing", 0, + "title", priv->title ? priv->title : get_default_title (), + "has-subtitle", FALSE, NULL); context = gtk_widget_get_style_context (titlebar); gtk_style_context_add_class (context, GTK_STYLE_CLASS_TITLEBAR); gtk_style_context_add_class (context, "default-decoration"); - title = g_markup_printf_escaped ("%s", - priv->title ? priv->title : get_default_title ()); - label = gtk_label_new (title); - g_free (title); - g_object_set (label, - "use-markup", TRUE, - "ellipsize", PANGO_ELLIPSIZE_END, - "margin", 6, - NULL); - - gtk_header_bar_set_custom_title (GTK_HEADER_BAR (titlebar), label); - return titlebar; }