diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2021-02-12 17:18:51 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2021-04-10 21:55:43 +0200 |
commit | a3fbca162d786692986218e18fb0994ad850db17 (patch) | |
tree | bfbe7dca0d06e03015ed0a0bffb91e5eec726440 | |
parent | 3a2709b2765425759846195754f69787e7803678 (diff) |
sidebar: use real height to determine preffered size
There was a bug causing to crop the sidebar in online:
1. open odt file in 2 sessions
2. select image in session A
3. move mouse over sidebar in session B
4. move mouse over sidebar in session A
Result: sidebar A was cropped
PosSizePropertyPanel on context change
did some windows visibility changes in the meantime.
get_preffered_size() returned lower height than real
value in SidebarPanelBase::getHeightForWidth
call queue_resize to invalidate cached optimal size
Change-Id: I8080259ffb12ae3f6613e7749e908d6ef55c1f3a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110894
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112092
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
-rw-r--r-- | sfx2/source/sidebar/SidebarPanelBase.cxx | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sfx2/source/sidebar/SidebarPanelBase.cxx b/sfx2/source/sidebar/SidebarPanelBase.cxx index 6865047df252..9ca1d7ccb431 100644 --- a/sfx2/source/sidebar/SidebarPanelBase.cxx +++ b/sfx2/source/sidebar/SidebarPanelBase.cxx @@ -171,6 +171,7 @@ ui::LayoutSize SAL_CALL SidebarPanelBase::getHeightForWidth (const sal_Int32 nWi else if (isLayoutEnabled(mpControl)) { // widget layout-based sidebar + mpControl->queue_resize(); Size aSize(mpControl->get_preferred_size()); return ui::LayoutSize(aSize.Height(), aSize.Height(), aSize.Height()); } |