diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-09-25 16:44:03 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-09-27 14:59:32 -0500 |
commit | fccd0da9c6bf6045c000221fa2f4052b5bf25311 (patch) | |
tree | ed9b70ef33ed920ac822c70c42e4b7aaf8e109b9 /libs/canvas | |
parent | 8be313932e1fe90b5b74968412737db7cb22573c (diff) |
bug fixes for Canvas::Box
Diffstat (limited to 'libs/canvas')
-rw-r--r-- | libs/canvas/box.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libs/canvas/box.cc b/libs/canvas/box.cc index d7d0c90548..b23deddaf4 100644 --- a/libs/canvas/box.cc +++ b/libs/canvas/box.cc @@ -43,6 +43,7 @@ Box::Box (Item* parent, Orientation o) , spacing (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) + , homogenous (false) { self = new Rectangle (this); self->set_outline (false); @@ -56,6 +57,7 @@ Box::Box (Item* parent, Duple const & p, Orientation o) , spacing (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) + , homogenous (false) { self = new Rectangle (this); self->set_outline (false); @@ -170,7 +172,7 @@ Box::reposition_children () boost::optional<Rect> bb = (*i)->bounding_box(); if (bb) { 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)); + } else { 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)); } } |