[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - sfx2/source

Samuel Mehrbrodt (via logerrit) logerrit at kemper.freedesktop.org
Fri Apr 12 08:09:45 UTC 2019


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

New commits:
commit ce52a47de926497bb2ade92c6f09ee6e42d03ad7
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Thu Apr 11 15:34:13 2019 +0200
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Fri Apr 12 10:09:12 2019 +0200

    tdf#124654 Don't reopen closed sidebar decks
    
    NotifyResize was called after a deck was closed,
    so this is the wrong place to ensure minimum sidebar width.
    
    Change-Id: I5a03dc1ee24257d49673db58bffbda1a7358cf3a
    Reviewed-on: https://gerrit.libreoffice.org/70597
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    (cherry picked from commit b5fdb148fe87a90f3e586efcea7aa6ef865fa42a)
    Reviewed-on: https://gerrit.libreoffice.org/70639
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index 1121dcea1d32..739963e1c36e 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -540,6 +540,13 @@ void SidebarController::OpenThenToggleDeck (
     }
     RequestOpenDeck();
     SwitchToDeck(rsDeckId);
+
+    // Make sure the sidebar is wide enough to fit the requested content
+    sal_Int32 nRequestedWidth = (mpCurrentDeck->GetMinimalWidth() + TabBar::GetDefaultWidth())
+                                * mpTabBar->GetDPIScaleFactor();
+    if (mnSavedSidebarWidth < nRequestedWidth)
+        SetChildWindowWidth(nRequestedWidth);
+
     mpTabBar->Invalidate();
     mpTabBar->HighlightDeck(rsDeckId);
 }
@@ -1198,10 +1205,6 @@ void SidebarController::RestrictWidth (sal_Int32 nWidth)
         const sal_Int32 nRequestedWidth
             = (TabBar::GetDefaultWidth() + nWidth) * mpTabBar->GetDPIScaleFactor();
 
-        // Make sure the sidebar is wide enough to fit the requested content
-        if (pSplitWindow->GetSizePixel().Width() < nRequestedWidth)
-            SetChildWindowWidth(nRequestedWidth);
-
         pSplitWindow->SetItemSizeRange(
             nSetId,
             Range(nRequestedWidth,


More information about the Libreoffice-commits mailing list