diff options
author | William Jon McCann <william.jon.mccann@gmail.com> | 2014-02-27 14:19:32 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2014-03-03 15:00:13 -0500 |
commit | 322f6c740f631abc24cc26fa2b81307eae18ef2c (patch) | |
tree | 63d386d731ed0f4bd3eba76247f970357e1d027c /gtk/gtkdialog.c | |
parent | 9ce98deb25800f1baaf01ce000d3a06a4785d245 (diff) | |
download | gtk+-322f6c740f631abc24cc26fa2b81307eae18ef2c.tar.gz |
dialogs: always use CSD on dialogs
If we aren't using a header bar then put a fake titlebar
box on it so we can round the corners.
One of the advantages of this is so that the styling of the dialog
is completely within one theme framework. This prevents skew between
the theming expectations from the window manager and GTK+.
https://bugzilla.gnome.org/show_bug.cgi?id=725345
Diffstat (limited to 'gtk/gtkdialog.c')
-rw-r--r-- | gtk/gtkdialog.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gtk/gtkdialog.c b/gtk/gtkdialog.c index 8e5797fbaf..37d9bf0bce 100644 --- a/gtk/gtkdialog.c +++ b/gtk/gtkdialog.c @@ -279,7 +279,18 @@ apply_use_header_bar (GtkDialog *dialog) gtk_widget_set_visible (priv->action_area, !priv->use_header_bar); gtk_widget_set_visible (priv->headerbar, priv->use_header_bar); if (!priv->use_header_bar) - gtk_window_set_titlebar (GTK_WINDOW (dialog), NULL); + { + GtkWidget *box = NULL; + + if (gtk_window_get_type_hint (GTK_WINDOW (dialog)) == GDK_WINDOW_TYPE_HINT_DIALOG) + { + box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); + gtk_widget_show (box); + gtk_widget_set_size_request (box, -1, 16); + } + + gtk_window_set_titlebar (GTK_WINDOW (dialog), box); + } if (priv->use_header_bar) g_signal_connect (priv->action_area, "add", G_CALLBACK (add_cb), dialog); } |