Commit cacac4f8 authored by Matthias Clasen's avatar Matthias Clasen

csd: Improve the window title

Manually create the label, so that we can set its margins.
parent f0a481d9
......@@ -5198,7 +5198,8 @@ create_decoration (GtkWidget *widget)
GtkWindow *window = GTK_WINDOW (widget);
GtkWindowPrivate *priv = window->priv;
GtkStyleContext *context;
const gchar *title;
gchar *title;
GtkWidget *label;
/* Client decorations already created */
if (priv->client_decorated)
......@@ -5244,11 +5245,17 @@ create_decoration (GtkWidget *widget)
gtk_style_context_add_class (context, "titlebar");
gtk_widget_set_parent (priv->title_box, GTK_WIDGET (window));
if (priv->title)
title = priv->title;
title = get_default_title ();
gtk_header_bar_set_title (GTK_HEADER_BAR (priv->title_box), title);
title = g_markup_printf_escaped ("<b>%s</b>",
priv->title ? priv->title : get_default_title ());
label = gtk_label_new (title);
g_free (title);
g_object_set (label,
"use-markup", TRUE,
"margin", 6,
gtk_header_bar_set_custom_title (GTK_HEADER_BAR (priv->title_box), label);
gtk_widget_show_all (priv->title_box);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment