gtkheaderbar: add style classes to all title buttons

Commit b187773053 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
This commit is contained in:
Alberts Muktupāvels 2017-04-06 11:16:12 +03:00
parent 7860e2d5cd
commit acf50005ab

View File

@ -352,6 +352,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);
if (!_gtk_header_bar_update_window_icon (bar, window))
{
@ -369,6 +370,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);