mirror of
https://github.com/brl/mutter.git
synced 2024-12-26 04:42:14 +00:00
frames: Add CSS class on init
Adding the 'default-decoration' CSS class to MetaFrameHeader after it is set as the headerbar makes it not account for the minimum size correctly sometimes. This is a bit racy though - if the window opens very quickly, it works as expected. Adding the CSS class before the widget is used guarantees it'll always report the correct size though, so do that. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2753>
This commit is contained in:
parent
88a53cc9ce
commit
ac09ce11fd
@ -118,6 +118,8 @@ meta_frame_header_init (MetaFrameHeader *content)
|
||||
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);
|
||||
|
||||
gtk_widget_add_css_class (GTK_WIDGET (content), "default-decoration");
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
|
@ -228,7 +228,6 @@ 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);
|
||||
|
Loading…
Reference in New Issue
Block a user