[Libreoffice-commits] core.git: sfx2/source
Samuel Mehrbrodt (via logerrit)
logerrit at kemper.freedesktop.org
Fri Apr 12 06:17:55 UTC 2019
sfx2/source/sidebar/SidebarController.cxx | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
New commits:
commit b5fdb148fe87a90f3e586efcea7aa6ef865fa42a
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Thu Apr 11 15:34:13 2019 +0200
Commit: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Fri Apr 12 08:17:11 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>
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index c9958afbe388..e15415fae421 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -553,6 +553,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);
collectUIInformation(rsDeckId);
@@ -1223,10 +1230,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