This implementation is unsuitable for centering a group of widgets. I
have a better one in mind, but no time to implement it now.
row.back() = geom.*(ptrs.dim)-margin.*(ptrs.high_margin);
}
+ if(((*i)->*(ptrs.packing)).gravity==0)
+ {
+ /* This forces the widget's distance from the left and right edge of
+ the container to be equal. It's a bit of a hack, but more time and
+ thought is needed for a better solution. */
+ LinearProgram::Row row = linprog.add_row();
+ row[(*i)->index*5+2] = 1;
+ row[(*i)->index*5+3] = -1;
+ }
+
{
/* Only allow the widget's dimension to increase. The geometry has
previously been set to the smallest allowable size. */