summaryrefslogtreecommitdiff
path: root/sfx2/source/sidebar/SidebarController.cxx
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2019-02-01 10:56:46 -0500
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-07-26 20:30:36 +0200
commit53644c6d62002879431c36b9da5f6771e5234992 (patch)
treeff5d6494599d4f0355f1698ec604cbcbc6c017a8 /sfx2/source/sidebar/SidebarController.cxx
parentd13e036ddc56bfdc9decccfa58e2e2b57eac765b (diff)
sfx2: LOK: resize the sidebar after layouting to avoid scrollbars
By resizing the deck we ensure that if the contents do not fit in the existing height, they will after we expand to the minimum height. Also, the minimum height is now the correct one. This prevents seeing vertical scrollbar in LOK, which is very slow and unfriendly, instead renders the full sidebar and lets the client scroll, if necessary. Change-Id: Idc2a622a65074b7afb26263624f2df0b5968f40d Reviewed-on: https://gerrit.libreoffice.org/73523 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source/sidebar/SidebarController.cxx')
-rw-r--r--sfx2/source/sidebar/SidebarController.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index f099e5f7c5d2..7e1d9ab17bb9 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -405,13 +405,15 @@ void SidebarController::NotifyResize()
// Place the deck first.
if (bIsDeckVisible)
{
- // No TabBar in LOK.
if (comphelper::LibreOfficeKit::isActive())
{
- // The minimal deck height is unreliable because of
- // the fluid way the panels are stretched. Fix minimum manually.
- // const sal_Int32 nMinimalHeight = mpCurrentDeck->GetMinimalHeight();
- mpCurrentDeck->setPosSizePixel(nDeckX, 0, nWidth, 600);
+ // No TabBar in LOK (use nWidth in full).
+ // Use the minimum height that is large enough to let the
+ // layouter expand the panes maximally (that have a minimal
+ // height before the scrollbar is shown), so we never get
+ // scrollbars (we want scrolling to be done on the rendered
+ // image in the client, which is much faster).
+ mpCurrentDeck->setPosSizePixel(nDeckX, 0, nWidth, 650);
}
else
mpCurrentDeck->setPosSizePixel(nDeckX, 0, nWidth - nTabBarDefaultWidth, nHeight);