vcl/source/window/syswin.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit a80fdc6894b81b7cd35fcf2c23079497daa66f89 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Apr 2 15:05:48 2021 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Fri Apr 2 17:46:54 2021 +0200 tdf#141318 Dialog::GetOptimalSize not including border if called before Show Change-Id: I96ed67d84660106af2ef5de488da8abc7d556d1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113519 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index 64dd582f1277..ecba89c0aac1 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -1018,7 +1018,10 @@ Size SystemWindow::GetOptimalSize() const if (!isLayoutEnabled()) return Window::GetOptimalSize(); - Size aSize = VclContainer::getLayoutRequisition(*GetWindow(GetWindowType::FirstChild)); + Window *pBox = GetWindow(GetWindowType::FirstChild); + // tdf#141318 Do the same as SystemWindow::setOptimalLayoutSize in case we're called before initial layout + const_cast<SystemWindow*>(this)->settingOptimalLayoutSize(pBox); + Size aSize = VclContainer::getLayoutRequisition(*pBox); sal_Int32 nBorderWidth = get_border_width(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits