ui/gtk/window.c

branch
newapi
changeset 336
56c12f44c2d3
parent 320
be224cf1f50e
child 344
870dd3d41d83
equal deleted inserted replaced
335:91d4f0391282 336:56c12f44c2d3
120 adw_application_window_set_content(ADW_APPLICATION_WINDOW(obj->widget), toolbar_view); 120 adw_application_window_set_content(ADW_APPLICATION_WINDOW(obj->widget), toolbar_view);
121 adw_toolbar_view_set_content(ADW_TOOLBAR_VIEW(toolbar_view), vbox); 121 adw_toolbar_view_set_content(ADW_TOOLBAR_VIEW(toolbar_view), vbox);
122 122
123 GtkWidget *headerbar = adw_header_bar_new(); 123 GtkWidget *headerbar = adw_header_bar_new();
124 adw_toolbar_view_add_top_bar(ADW_TOOLBAR_VIEW(toolbar_view), headerbar); 124 adw_toolbar_view_add_top_bar(ADW_TOOLBAR_VIEW(toolbar_view), headerbar);
125 g_object_set_data(G_OBJECT(obj->widget), "ui_headerbar", headerbar);
125 126
126 if(!simple) { 127 if(!simple) {
127 ui_fill_headerbar(obj, headerbar); 128 ui_fill_headerbar(obj, headerbar);
128 } 129 }
129 #elif GTK_MAJOR_VERSION >= 4 130 #elif GTK_MAJOR_VERSION >= 4
165 GtkWidget *content_box = ui_gtk_vbox_new(0); 166 GtkWidget *content_box = ui_gtk_vbox_new(0);
166 gtk_container_add(GTK_CONTAINER(frame), content_box); 167 gtk_container_add(GTK_CONTAINER(frame), content_box);
167 obj->container = ui_box_container(obj, content_box); 168 obj->container = ui_box_container(obj, content_box);
168 */ 169 */
169 GtkWidget *content_box = ui_gtk_vbox_new(0); 170 GtkWidget *content_box = ui_gtk_vbox_new(0);
170 BOX_ADD(GTK_BOX(vbox), content_box); 171 BOX_ADD_EXPAND(GTK_BOX(vbox), content_box);
171 obj->container = ui_box_container(obj, content_box, UI_CONTAINER_VBOX); 172 obj->container = ui_box_container(obj, content_box, UI_CONTAINER_VBOX);
172 173
173 nwindows++; 174 nwindows++;
174 return obj; 175 return obj;
175 } 176 }

mercurial