From 51110a92d940f860e6b443f102437bd641b435b8 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 31 Aug 2021 13:21:12 -0600 Subject: [PATCH] canvas: fix computation of Box bounding box --- libs/canvas/box.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/libs/canvas/box.cc b/libs/canvas/box.cc index 88e72dcdd2..dd751f0161 100644 --- a/libs/canvas/box.cc +++ b/libs/canvas/box.cc @@ -84,14 +84,10 @@ Box::compute_bounding_box () const if (_bounding_box) { Rect r = _bounding_box; - /* left and top margin and padding is already built into the - * position of children - */ - - _bounding_box = r.expand (0.0, + _bounding_box = r.expand (top_padding + outline_width() + top_margin, right_padding + outline_width() + right_margin, bottom_padding + outline_width() + bottom_margin, - 0.0); + left_padding + outline_width() + left_margin); } bb_clean ();