Sun, 29 Sep 2024 19:06:29 +0200
fix simple window (libadwaita)
ui/gtk/window.c | file | annotate | diff | comparison | revisions |
--- a/ui/gtk/window.c Sun Sep 29 19:01:47 2024 +0200 +++ b/ui/gtk/window.c Sun Sep 29 19:06:29 2024 +0200 @@ -116,14 +116,14 @@ 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); + 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