sfx2/source/sidebar/SidebarController.cxx |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit a37f77b8c297a28e6bb0072eb882f62a920aecf5
Author:     Mihai Vasiliu <mihai.vasiliu...@gmail.com>
AuthorDate: Thu Oct 5 16:28:02 2023 +0300
Commit:     Patrick Luby <plub...@neooffice.org>
CommitDate: Sun Oct 8 02:16:17 2023 +0200

    tdf#150639 Fix sidebar width too narrow
    
    The mnWidthOnSplitterButtonDown is initialized to 0 at program start.
    This makes every call to take the else case until the user manually changes 
the
    width, but some decks such as Master Slides have the mnMinimalWidth too low 
which
    makes them too narrow for the content they should display to the user.
    
    Change-Id: I8fc4924f777770dedbdc8d162ceceb620ff80e59
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157596
    Tested-by: Jenkins
    Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    (cherry picked from commit 6e6db2a3360d7ee89cae14cbcfe386e7425daf98)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157621
    Reviewed-by: Mihai Vasiliu <mihai.vasiliu...@gmail.com>
    Reviewed-by: Patrick Luby <plub...@neooffice.org>

diff --git a/sfx2/source/sidebar/SidebarController.cxx 
b/sfx2/source/sidebar/SidebarController.cxx
index b967cbb10369..278c0ca34719 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -658,7 +658,12 @@ void SidebarController::OpenThenToggleDeck (
         if(mnWidthOnSplitterButtonDown > 0 && mnWidthOnSplitterButtonDown > 
nRequestedWidth){
             SetChildWindowWidth(mnWidthOnSplitterButtonDown);
         }else{
-            SetChildWindowWidth(nRequestedWidth);
+            // tdf#150639 The mnWidthOnSplitterButtonDown is initialized to 0 
at program start.
+            // This makes every call to take the else case until the user 
manually changes the
+            // width, but some decks such as Master Slides have the 
mnMinimalWidth too low which
+            // makes them too narrow for the content they should display to 
the user.
+            SetChildWindowWidth(nRequestedWidth > mnSavedSidebarWidth ? 
nRequestedWidth
+                                                                      : 
mnSavedSidebarWidth);
         }
     }
 }

Reply via email to