Sun, 29 Sep 2024 18:56:26 +0200
don't add the headerbar to simple windows (GTK)
ui/gtk/window.c | file | annotate | diff | comparison | revisions |
--- a/ui/gtk/window.c Sun Sep 29 18:51:03 2024 +0200 +++ b/ui/gtk/window.c Sun Sep 29 18:56:26 2024 +0200 @@ -116,14 +116,16 @@ GtkWidget *vbox = ui_gtk_vbox_new(0); #ifdef UI_LIBADWAITA - GtkWidget *toolbar_view = adw_toolbar_view_new(); - adw_application_window_set_content(ADW_APPLICATION_WINDOW(obj->widget), toolbar_view); - adw_toolbar_view_set_content(ADW_TOOLBAR_VIEW(toolbar_view), vbox); - - GtkWidget *headerbar = adw_header_bar_new(); - adw_toolbar_view_add_top_bar(ADW_TOOLBAR_VIEW(toolbar_view), headerbar); - - ui_fill_headerbar(obj, headerbar); + if(!simple) { + GtkWidget *toolbar_view = adw_toolbar_view_new(); + adw_application_window_set_content(ADW_APPLICATION_WINDOW(obj->widget), toolbar_view); + adw_toolbar_view_set_content(ADW_TOOLBAR_VIEW(toolbar_view), vbox); + + GtkWidget *headerbar = adw_header_bar_new(); + adw_toolbar_view_add_top_bar(ADW_TOOLBAR_VIEW(toolbar_view), headerbar); + + ui_fill_headerbar(obj, headerbar); + } #elif GTK_MAJOR_VERSION >= 4 WINDOW_SET_CONTENT(obj->widget, vbox); #else