13
0

change Grid API to avoid unnecessary Duple and open door for row/col span

This commit is contained in:
Paul Davis 2017-01-30 18:41:11 +01:00
parent 91908dde7e
commit 2c9b0796a3
2 changed files with 3 additions and 3 deletions

View File

@ -47,7 +47,7 @@ public:
void set_border_width (double w) { set_outline_width (w); }
void set_border_color (Color c) { set_outline_color (c); }
void place (Item*, Duple coord);
void place (Item*, double x, double y, double col_span = 1, double row_span = 1);
void set_collapse_on_hide (bool);
void set_homogenous (bool);

View File

@ -313,10 +313,10 @@ Grid::reposition_children ()
}
void
Grid::place (Item* i, Duple at)
Grid::place (Item* i, double x, double y, double col_span, double row_span)
{
add (i);
coords_by_item.insert (std::make_pair (i, at));
coords_by_item.insert (std::make_pair (i, Duple (x, y)));
reposition_children ();
}