[Libreoffice-commits] core.git: sfx2/source

Ashod Nakashian (via logerrit) logerrit at kemper.freedesktop.org
Fri Jul 26 18:39:08 UTC 2019


 sfx2/source/sidebar/SidebarController.cxx |   17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

New commits:
commit 4622d1766858e7be0615e99f9868d250076188ab
Author:     Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Sun Feb 3 10:53:21 2019 -0500
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Jul 26 20:38:02 2019 +0200

    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 at collabora.co.uk>

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);


More information about the Libreoffice-commits mailing list