window: set GTK_STYLE_CLASS_TITLEBAR to custom titles

When a custom title is added to a GtkWindow, add the
GTK_STYLE_CLASS_TITLEBAR to it, so the theme can apply the default rules
for its style.

https://bugzilla.gnome.org/show_bug.cgi?id=706045
This commit is contained in:
Cosimo Cecchi 2013-08-16 19:26:12 +02:00 committed by Matthias Clasen
parent 3ea0e4a019
commit 9896b9960d

View File

@ -3505,6 +3505,9 @@ gtk_window_set_titlebar (GtkWindow *window,
if (visual)
gtk_widget_set_visual (widget, visual);
gtk_style_context_add_class (gtk_widget_get_style_context (titlebar),
GTK_STYLE_CLASS_TITLEBAR);
gtk_widget_queue_resize (widget);
}