ui/gtk/container.c

changeset 121
1cc365c34125
parent 120
49bc645df8b7
child 140
c03c338a7dcf
equal deleted inserted replaced
120:49bc645df8b7 121:1cc365c34125
192 ct->add = ui_scrolledwindow_container_add; 192 ct->add = ui_scrolledwindow_container_add;
193 return ct; 193 return ct;
194 } 194 }
195 195
196 void ui_scrolledwindow_container_add(UiContainer *ct, GtkWidget *widget, UiBool fill) { 196 void ui_scrolledwindow_container_add(UiContainer *ct, GtkWidget *widget, UiBool fill) {
197 // TODO: check if the widget implements GtkScrollable
198 #ifdef UI_GTK3
197 gtk_container_add(GTK_CONTAINER(ct->widget), widget); 199 gtk_container_add(GTK_CONTAINER(ct->widget), widget);
200 #else
201 gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(ct->widget), widget);
202 #endif
198 ui_reset_layout(ct->layout); 203 ui_reset_layout(ct->layout);
199 ct->current = widget; 204 ct->current = widget;
200 } 205 }
201 206
202 UiContainer* ui_tabview_container(UiObject *obj, GtkWidget *tabview) { 207 UiContainer* ui_tabview_container(UiObject *obj, GtkWidget *tabview) {

mercurial