summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tk/grid.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tk/grid.c b/src/tk/grid.c
index de6d430..ca6b180 100644
--- a/src/tk/grid.c
+++ b/src/tk/grid.c
@@ -46,7 +46,6 @@ _mftk_grid_layout(struct mftk_widget *w)
w->h = 0;
for (r = 0; r < g->rows; ++r) {
- g->children_y[r] = w->h;
max_sz = 0;
for (c = 0; c < g->cols; ++c) {
mftk_widget_layout(g->children[r * g->cols + c]);
@@ -58,12 +57,12 @@ _mftk_grid_layout(struct mftk_widget *w)
if (r > 0) {
w->h += g->row_spacing;
}
+ g->children_y[r] = w->h;
w->h += max_sz;
}
w->w = 0;
for (c = 0; c < g->cols; ++c) {
- g->children_x[c] = w->w;
max_sz = 0;
for (r = 0; r < g->rows; ++r) {
sz = g->children[r * g->cols + c]->w;
@@ -74,6 +73,7 @@ _mftk_grid_layout(struct mftk_widget *w)
if (c > 0) {
w->w += g->col_spacing;
}
+ g->children_x[c] = w->w;
w->w += max_sz;
}
}