diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-02-28 13:59:43 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-02-28 21:02:28 +0100 |
commit | 43e6b55fd8b739cff834fe5551b4581a88af2d4f (patch) | |
tree | 5d6e876202e2d61208709714de1c9edeb3b12ecd /svx | |
parent | 50dec9d1d7fe292a8165f19a3553662effe9e64f (diff) |
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@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/sidebar/PanelLayout.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
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 |