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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Feb 28 20:03:08 UTC 2020


 svx/source/sidebar/PanelLayout.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 43e6b55fd8b739cff834fe5551b4581a88af2d4f
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Feb 28 13:59:43 2020 +0000
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Feb 28 21:02:28 2020 +0100

    use the container size as the optimal size when available
    
    to avoid getting the size set on the native adaptor via
    GtkSalObject::SetPosSize
    
    which matters for the calc navigator expand/shrink case
    
    Change-Id: I181fee56debe591999c29eead7ee057113078319
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89716
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/svx/source/sidebar/PanelLayout.cxx b/svx/source/sidebar/PanelLayout.cxx
index e82c03fdc513..1c909a9720f2 100644
--- a/svx/source/sidebar/PanelLayout.cxx
+++ b/svx/source/sidebar/PanelLayout.cxx
@@ -64,7 +64,8 @@ Size PanelLayout::GetOptimalSize() const
 {
     if (isLayoutEnabled(this))
     {
-        Size aSize = VclContainer::getLayoutRequisition(*GetWindow(GetWindowType::FirstChild));
+        Size aSize = m_xContainer ? m_xContainer->get_preferred_size()
+                                  : VclContainer::getLayoutRequisition(*GetWindow(GetWindowType::FirstChild));
         if (mxFrame)
         {
             SidebarController* pController


More information about the Libreoffice-commits mailing list