diff options
author | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2019-12-08 11:26:27 -0500 |
---|---|---|
committer | Ashod Nakashian <ashnakash@gmail.com> | 2019-12-26 03:18:29 +0100 |
commit | 0375d9b5613b6d0f16042c3134af1dcae706d57f (patch) | |
tree | 3713645ae9155d6bfd6b6d652f123ab8d6ff7e59 /sfx2/source/sidebar | |
parent | 53d20484f4c9d5dc152e35a871b03d097d6ad41f (diff) |
sidebar: no scrollbar in LOK
Scrolling in LOK is done in the client. We render
the sidebar as long as the original height is
(the minimum that will fit all panels) and scroll
in the client. For that, we keep the scrollbar
disabled when layouting the Deck.
Reviewed-on: https://gerrit.libreoffice.org/84720
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
(cherry picked from commit 09ddec08eaa0af1ca6a5f8a376abae9e62fe2607)
Change-Id: If0d813b04af679768f80ee88fc976bce9cde46d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85785
Tested-by: Jenkins
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Diffstat (limited to 'sfx2/source/sidebar')
-rw-r--r-- | sfx2/source/sidebar/DeckLayouter.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sfx2/source/sidebar/DeckLayouter.cxx b/sfx2/source/sidebar/DeckLayouter.cxx index b969dc91a8bb..5a6e61353696 100644 --- a/sfx2/source/sidebar/DeckLayouter.cxx +++ b/sfx2/source/sidebar/DeckLayouter.cxx @@ -23,6 +23,7 @@ #include <sfx2/sidebar/PanelTitleBar.hxx> #include <sfx2/sidebar/Deck.hxx> #include <sfx2/sidebar/SidebarController.hxx> +#include <comphelper/lok.hxx> #include <comphelper/processfactory.hxx> #include <vcl/window.hxx> @@ -177,8 +178,8 @@ tools::Rectangle LayoutPanels ( nTotalPreferredHeight += rItem.maLayoutSize.Preferred; } - if (nTotalMinimumHeight > nAvailableHeight - && ! bShowVerticalScrollBar) + if (nTotalMinimumHeight > nAvailableHeight && !bShowVerticalScrollBar + && !comphelper::LibreOfficeKit::isActive()) { // Not enough space, even when all panels are shrunk to their // minimum height. @@ -493,7 +494,8 @@ void DistributeHeights ( // There are no panels with unrestricted height. return; } - const sal_Int32 nAdditionalHeightPerPanel (nRemainingHeightToDistribute / nNoMaximumCount); + + const sal_Int32 nAdditionalHeightPerPanel(nRemainingHeightToDistribute / nNoMaximumCount); // Handle rounding error. sal_Int32 nAdditionalHeightForFirstPanel (nRemainingHeightToDistribute - nNoMaximumCount*nAdditionalHeightPerPanel); |