summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2019-02-03 10:53:21 -0500
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-07-26 20:38:02 +0200
commit4622d1766858e7be0615e99f9868d250076188ab (patch)
tree3bd15763dfcb8c05d4f2201d61be6e57314aaf11 /sfx2
parent53644c6d62002879431c36b9da5f6771e5234992 (diff)
sfx2: LOK: better fit of sidebar decks
As the patch comment explains, the properties deck needs to be rendered with height long enough to avoid scrolling, but others would be greedy in using up all the available height, so we render them in more restricted space. Change-Id: I361e653239e22a7be0e5d75505cdcde18f2367d3 Reviewed-on: https://gerrit.libreoffice.org/73524 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/sidebar/SidebarController.cxx17
1 files changed, 11 insertions, 6 deletions
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index 7e1d9ab17bb9..95eba02296e6 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -407,13 +407,18 @@ void SidebarController::NotifyResize()
{
if (comphelper::LibreOfficeKit::isActive())
{
+ // We want to let the layouter use up as much of the
+ // height as necessary to make sure no scrollbar is
+ // visible. This only works when there are no greedy
+ // panes that fill up all available area. So we only
+ // use this for the PropertyDeck, which has no such
+ // panes, while most other do. This is fine, since
+ // it's the PropertyDeck that really has many panes
+ // that can collapse or expand. For others, limit
+ // the height to something sensible.
+ const sal_Int32 nExtHeight = (msCurrentDeckId == "PropertyDeck" ? 2000 : 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);
+ mpCurrentDeck->setPosSizePixel(nDeckX, 0, nWidth, nExtHeight);
}
else
mpCurrentDeck->setPosSizePixel(nDeckX, 0, nWidth - nTabBarDefaultWidth, nHeight);