tdf#141424 Include the margin sizes while calculating width of window.
Change-Id: I0863dc62f1ade6cc07835e83eb242f3d5a9906bd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115068
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 0a79fb7..0ef0151 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -2771,7 +2771,7 @@ void VclHPaned::setAllocation(const Size& rAllocation)
if (bInitialAllocation)
nFirstWidth = getLayoutRequisition(*pChild).Width();
else
nFirstWidth = pChild->GetSizePixel().Width();
nFirstWidth = pChild->GetSizePixel().Width() + pChild->get_margin_start() + pChild->get_margin_end();
bFirstCanResize = pChild->get_expand();
}
else if (nElement == 2)
@@ -2779,7 +2779,7 @@ void VclHPaned::setAllocation(const Size& rAllocation)
if (bInitialAllocation)
nSecondWidth = getLayoutRequisition(*pChild).Width();
else
nSecondWidth = pChild->GetSizePixel().Width();
nSecondWidth = pChild->GetSizePixel().Width() + pChild->get_margin_start() + pChild->get_margin_end();
bSecondCanResize = pChild->get_expand();
}
++nElement;