summaryrefslogtreecommitdiff
path: root/sfx2/source/sidebar/SidebarController.cxx
diff options
context:
space:
mode:
authorMihai Vasiliu <mihai.vasiliu.93@gmail.com>2023-10-05 16:28:02 +0300
committerCaolán McNamara <caolan.mcnamara@collabora.com>2023-10-06 10:43:03 +0200
commit6e6db2a3360d7ee89cae14cbcfe386e7425daf98 (patch)
treee7e808dd40864d09ebf9c1d5927ce172f84d61ce /sfx2/source/sidebar/SidebarController.cxx
parente1f630cd762eb99be23045107d3751e1ab91f410 (diff)
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.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sfx2/source/sidebar/SidebarController.cxx')
-rw-r--r--sfx2/source/sidebar/SidebarController.cxx7
1 files changed, 6 insertions, 1 deletions
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);
}
}
}