gtkheaderbar: add style classes to all title buttons
authorAlberts Muktupāvels <alberts.muktupavels@gmail.com>
Thu, 6 Apr 2017 08:16:12 +0000 (11:16 +0300)
committerAlberts Muktupāvels <alberts.muktupavels@gmail.com>
Thu, 6 Apr 2017 12:35:55 +0000 (15:35 +0300)
Commit b187773053098cca1b7c23e04e096d47fbb65a5f added CSS style
classes for minimize, maximize and close buttons. Add similar classes
also to icon and menu buttons.

https://bugzilla.gnome.org/show_bug.cgi?id=780944

gtk/gtkheaderbar.c

index 8ea664c8e746e835f880a0f30e38263c5ed91ad8..3a6eeab7cb6eee1a57f7f6d077bfe9f8a961147f 100644 (file)
@@ -356,6 +356,7 @@ _gtk_header_bar_update_window_buttons (GtkHeaderBar *bar)
                   gtk_widget_set_valign (button, GTK_ALIGN_CENTER);
                   priv->titlebar_icon = button;
                   gtk_style_context_add_class (gtk_widget_get_style_context (button), "titlebutton");
+                  gtk_style_context_add_class (gtk_widget_get_style_context (button), "icon");
                   gtk_widget_set_size_request (button, 20, 20);
                   gtk_widget_show (button);
                   if (!_gtk_header_bar_update_window_icon (bar, window))
@@ -374,6 +375,7 @@ _gtk_header_bar_update_window_buttons (GtkHeaderBar *bar)
                   gtk_menu_button_set_menu_model (GTK_MENU_BUTTON (button), menu);
                   gtk_menu_button_set_use_popover (GTK_MENU_BUTTON (button), TRUE);
                   gtk_style_context_add_class (gtk_widget_get_style_context (button), "titlebutton");
+                  gtk_style_context_add_class (gtk_widget_get_style_context (button), "appmenu");
                   image = gtk_image_new ();
                   gtk_container_add (GTK_CONTAINER (button), image);
                   gtk_widget_set_can_focus (button, FALSE);