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

New commits:
commit 6e6db2a3360d7ee89cae14cbcfe386e7425daf98
Author:     Mihai Vasiliu <mihai.vasiliu...@gmail.com>
AuthorDate: Thu Oct 5 16:28:02 2023 +0300
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Fri Oct 6 10:43:03 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>

diff --git a/sfx2/source/sidebar/SidebarController.cxx 
b/sfx2/source/sidebar/SidebarController.cxx
index 4798e1a33435..c6137d94d0e8 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