tdf#141424 Include the margin sizes while calculating width of window.
Follow up development f61fcf6fe6b9f54dd57ca5d868b1b0436e9cec61
First one fixed only horizontal panes. Apply the same fix to vertical
panes (eg: sidebar->gallery)
Change-Id: I7e5e1bb7bf559741dd265a8bbc6f845a2f31efde
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115151
Tested-by: Jenkins
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 0ef0151..7ee7665 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -2652,7 +2652,7 @@ void VclVPaned::setAllocation(const Size& rAllocation)
if (bInitialAllocation)
nFirstHeight = getLayoutRequisition(*pChild).Height();
else
nFirstHeight = pChild->GetSizePixel().Height();
nFirstHeight = pChild->GetSizePixel().Height() + pChild->get_margin_top() + pChild->get_margin_bottom();
bFirstCanResize = pChild->get_expand();
}
else if (nElement == 2)
@@ -2660,7 +2660,7 @@ void VclVPaned::setAllocation(const Size& rAllocation)
if (bInitialAllocation)
nSecondHeight = getLayoutRequisition(*pChild).Height();
else
nSecondHeight = pChild->GetSizePixel().Height();
nSecondHeight = pChild->GetSizePixel().Height() + pChild->get_margin_top() + pChild->get_margin_bottom();
bSecondCanResize = pChild->get_expand();
}
++nElement;