change Grid API to avoid unnecessary Duple and open door for row/col span
This commit is contained in:
parent
91908dde7e
commit
2c9b0796a3
@ -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);
|
||||
|
@ -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 ();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user