Commit da55c86d authored by Matthias Clasen's avatar Matthias Clasen

csd: Use a dedicated style class for window buttons

This allows themes to differentiate between regular buttons
in a title bar, and window buttons.
parent cacac4f8
......@@ -5119,6 +5119,7 @@ update_window_buttons (GtkWindow *window)
if (strcmp (t[j], "icon") == 0)
{
button = gtk_image_new ();
gtk_style_context_add_class (gtk_widget_get_style_context (button), "titlebutton");
gtk_widget_set_size_request (button, 20, 20);
gtk_widget_show (button);
if (icon != NULL)
......@@ -5135,6 +5136,7 @@ update_window_buttons (GtkWindow *window)
priv->gdk_type_hint == GDK_WINDOW_TYPE_HINT_NORMAL)
{
button = gtk_button_new ();
gtk_style_context_add_class (gtk_widget_get_style_context (button), "titlebutton");
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);
......@@ -5152,6 +5154,7 @@ update_window_buttons (GtkWindow *window)
icon_name = maximized ? "window-restore-symbolic" : "window-maximize-symbolic";
button = gtk_button_new ();
gtk_style_context_add_class (gtk_widget_get_style_context (button), "titlebutton");
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);
......@@ -5167,6 +5170,7 @@ update_window_buttons (GtkWindow *window)
{
button = gtk_button_new ();
image = gtk_image_new_from_icon_name ("window-delete-symbolic", GTK_ICON_SIZE_MENU);
gtk_style_context_add_class (gtk_widget_get_style_context (button), "titlebutton");
g_object_set (image, "use-fallback", TRUE, NULL);
gtk_container_add (GTK_CONTAINER (button), image);
gtk_widget_set_can_focus (button, FALSE);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment