sfx2/source/sidebar/DeckLayouter.cxx |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 0375d9b5613b6d0f16042c3134af1dcae706d57f
Author:     Ashod Nakashian <ashod.nakash...@collabora.co.uk>
AuthorDate: Sun Dec 8 11:26:27 2019 -0500
Commit:     Ashod Nakashian <ashnak...@gmail.com>
CommitDate: Thu Dec 26 03:18:29 2019 +0100

    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 <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Ashod Nakashian <ashnak...@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 <ashnak...@gmail.com>

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);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to