# HG changeset patch # User Olaf Wintermann # Date 1727628986 -7200 # Node ID e15ff2183b43fc24ed79dd8d3c83ddb99e78e8b6 # Parent 144c2b4683cb68f657503530b83d460976321e88 don't add the headerbar to simple windows (GTK) diff -r 144c2b4683cb -r e15ff2183b43 ui/gtk/window.c --- 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