frames: Add default-decoration CSS class

Add this CSS class both to the header bar itself, since it is what
actually contains the window controls, and to MetaFrameHeader too,
since it's what's directly attached to the window.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2740>
This commit is contained in:
Georges Basile Stavracas Neto 2022-12-05 14:15:29 -03:00
parent f7f88c1557
commit 62ddea304a
2 changed files with 3 additions and 0 deletions

View File

@ -115,6 +115,8 @@ meta_frame_header_init (MetaFrameHeader *content)
GtkWidget *header_bar;
header_bar = gtk_header_bar_new ();
gtk_widget_add_css_class (header_bar, "titlebar");
gtk_widget_add_css_class (header_bar, "default-decoration");
gtk_widget_insert_before (header_bar, GTK_WIDGET (content), NULL);
}

View File

@ -228,6 +228,7 @@ meta_frame_new (Window window)
header = meta_frame_header_new ();
gtk_window_set_titlebar (GTK_WINDOW (frame), header);
gtk_widget_add_css_class (frame, "default-decoration");
content = meta_frame_content_new (window);
gtk_window_set_child (GTK_WINDOW (frame), content);