From 0375d9b5613b6d0f16042c3134af1dcae706d57f Mon Sep 17 00:00:00 2001 From: Ashod Nakashian Date: Sun, 8 Dec 2019 11:26:27 -0500 Subject: 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 Reviewed-by: Ashod Nakashian (cherry picked from commit 09ddec08eaa0af1ca6a5f8a376abae9e62fe2607) Change-Id: If0d813b04af679768f80ee88fc976bce9cde46d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85785 Tested-by: Jenkins Reviewed-by: Ashod Nakashian --- sfx2/source/sidebar/DeckLayouter.cxx | 8 +++++--- 1 file 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 #include #include +#include #include #include @@ -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); -- cgit