summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2015-02-15 13:03:29 -0500
committerMatthias Clasen <mclasen@redhat.com>2015-02-15 13:03:29 -0500
commitb187773053098cca1b7c23e04e096d47fbb65a5f (patch)
tree659117d55f0156812b55b43f3a299bf1aa16d058
parent2b31a35792b05ade94aa2847b52e7360a5fb2d03 (diff)
downloadgtk+-b187773053098cca1b7c23e04e096d47fbb65a5f.tar.gz
Add style classes to the title buttons
This will let themes treat close/min/max buttons differently, if they so desire. https://bugzilla.gnome.org/show_bug.cgi?id=744400
-rw-r--r--gtk/gtkheaderbar.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gtk/gtkheaderbar.c b/gtk/gtkheaderbar.c
index ecc6beac4c..f2f287858f 100644
--- a/gtk/gtkheaderbar.c
+++ b/gtk/gtkheaderbar.c
@@ -423,6 +423,7 @@ _gtk_header_bar_update_window_buttons (GtkHeaderBar *bar)
button = gtk_button_new ();
gtk_widget_set_valign (button, GTK_ALIGN_CENTER);
gtk_style_context_add_class (gtk_widget_get_style_context (button), "titlebutton");
+ gtk_style_context_add_class (gtk_widget_get_style_context (button), "minimize");
image = gtk_image_new_from_icon_name ("window-minimize-symbolic", GTK_ICON_SIZE_MENU);
g_object_set (image, "use-fallback", TRUE, NULL);
gtk_container_add (GTK_CONTAINER (button), image);
@@ -446,6 +447,7 @@ _gtk_header_bar_update_window_buttons (GtkHeaderBar *bar)
button = gtk_button_new ();
gtk_widget_set_valign (button, GTK_ALIGN_CENTER);
gtk_style_context_add_class (gtk_widget_get_style_context (button), "titlebutton");
+ gtk_style_context_add_class (gtk_widget_get_style_context (button), "maximize");
image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU);
g_object_set (image, "use-fallback", TRUE, NULL);
gtk_container_add (GTK_CONTAINER (button), image);
@@ -465,6 +467,7 @@ _gtk_header_bar_update_window_buttons (GtkHeaderBar *bar)
gtk_widget_set_valign (button, GTK_ALIGN_CENTER);
image = gtk_image_new_from_icon_name ("window-close-symbolic", GTK_ICON_SIZE_MENU);
gtk_style_context_add_class (gtk_widget_get_style_context (button), "titlebutton");
+ gtk_style_context_add_class (gtk_widget_get_style_context (button), "close");
g_object_set (image, "use-fallback", TRUE, NULL);
gtk_container_add (GTK_CONTAINER (button), image);
gtk_widget_set_can_focus (button, FALSE);