summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2019-02-03 10:53:21 -0500
committerJan Holesovsky <kendy@collabora.com>2019-04-30 18:06:32 +0200
commit7be22a8bdef111bb0ee382ab96646930ca829b5d (patch)
tree99195325040c8d145bdcbd34201d725cfa45b18f
parent94d7d8bcdcd609a5b714696259a8d4dcdd8f86a9 (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
-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 bc901a42c33a..420847351e53 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -416,13 +416,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);