[Libreoffice-commits] core.git: vcl/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Apr 2 15:47:39 UTC 2021


 vcl/source/window/syswin.cxx |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit a80fdc6894b81b7cd35fcf2c23079497daa66f89
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Apr 2 15:05:48 2021 +0100
Commit:     Caolán McNamara <caolanm at 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 <caolanm at 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();
 


More information about the Libreoffice-commits mailing list