ui/gtk/container.c

changeset 109
b9808f916687
parent 107
9aff1dc3990d
child 110
36f1581b43e2
--- a/ui/gtk/container.c	Sun Jan 24 11:59:58 2016 +0100
+++ b/ui/gtk/container.c	Sun Jan 24 12:08:57 2016 +0100
@@ -139,7 +139,9 @@
         gtk_widget_set_vexpand(widget, TRUE);
     }
     
-    gtk_grid_attach(GTK_GRID(ct->widget), widget, grid->x, grid->y, 1, 1);
+    int gwidth = ct->layout.gridwidth > 0 ? ct->layout.gridwidth : 1;
+    
+    gtk_grid_attach(GTK_GRID(ct->widget), widget, grid->x, grid->y, gwidth, 1);
     grid->x++;
     
     ui_reset_layout(ct->layout);
@@ -473,6 +475,11 @@
     ct->layout.vexpand = ui_bool2lb(expand);
 }
 
+void ui_layout_gridwidth(UiObject *obj, int width) {
+    UiContainer *ct = uic_get_current_container(obj);
+    ct->layout.gridwidth = width;
+}
+
 void ui_newline(UiObject *obj) {
     UiContainer *ct = uic_get_current_container(obj);
     ct->layout.newline = TRUE;

mercurial