mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-17 04:06:26 +01:00
bug fixes for Canvas::Box
This commit is contained in:
parent
8be313932e
commit
fccd0da9c6
1 changed files with 5 additions and 2 deletions
|
|
@ -43,6 +43,7 @@ Box::Box (Item* parent, Orientation o)
|
||||||
, spacing (0)
|
, spacing (0)
|
||||||
, top_padding (0), right_padding (0), bottom_padding (0), left_padding (0)
|
, top_padding (0), right_padding (0), bottom_padding (0), left_padding (0)
|
||||||
, top_margin (0), right_margin (0), bottom_margin (0), left_margin (0)
|
, top_margin (0), right_margin (0), bottom_margin (0), left_margin (0)
|
||||||
|
, homogenous (false)
|
||||||
{
|
{
|
||||||
self = new Rectangle (this);
|
self = new Rectangle (this);
|
||||||
self->set_outline (false);
|
self->set_outline (false);
|
||||||
|
|
@ -56,6 +57,7 @@ Box::Box (Item* parent, Duple const & p, Orientation o)
|
||||||
, spacing (0)
|
, spacing (0)
|
||||||
, top_padding (0), right_padding (0), bottom_padding (0), left_padding (0)
|
, top_padding (0), right_padding (0), bottom_padding (0), left_padding (0)
|
||||||
, top_margin (0), right_margin (0), bottom_margin (0), left_margin (0)
|
, top_margin (0), right_margin (0), bottom_margin (0), left_margin (0)
|
||||||
|
, homogenous (false)
|
||||||
{
|
{
|
||||||
self = new Rectangle (this);
|
self = new Rectangle (this);
|
||||||
self->set_outline (false);
|
self->set_outline (false);
|
||||||
|
|
@ -170,7 +172,7 @@ Box::reposition_children ()
|
||||||
boost::optional<Rect> bb = (*i)->bounding_box();
|
boost::optional<Rect> bb = (*i)->bounding_box();
|
||||||
if (bb) {
|
if (bb) {
|
||||||
largest_height = std::max (largest_height, bb.get().height());
|
largest_height = std::max (largest_height, bb.get().height());
|
||||||
largest_width = std::max (largest_height, bb.get().width());
|
largest_width = std::max (largest_width, bb.get().width());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -204,6 +206,7 @@ Box::reposition_children ()
|
||||||
}
|
}
|
||||||
|
|
||||||
previous_edge = previous_edge.translate (Duple (0, spacing + shift));
|
previous_edge = previous_edge.translate (Duple (0, spacing + shift));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
Distance shift = 0;
|
Distance shift = 0;
|
||||||
|
|
@ -226,7 +229,7 @@ Box::reposition_children ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
previous_edge = previous_edge.translate (Duple (0, spacing + shift));
|
previous_edge = previous_edge.translate (Duple (spacing + shift, 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue