diff options
author | Heiko Tietze <tietze.heiko@gmail.com> | 2021-06-04 14:42:58 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-06-22 09:26:00 +0200 |
commit | b1d135484940db34bc84940c06a2df1740d19469 (patch) | |
tree | d01afeeecf6b2240289a9706583c426b5a886765 /sfx2/source/sidebar/SidebarController.cxx | |
parent | 5a15f6dc15449fd83949fbff296fe2f72c20639f (diff) |
Resolves tdf#140360 - Provide option to turn off sidebar's minimum width
Boolean option Sidebar:General:MinimumWidth introduced defaulting
to true; if false the sidebar width is under full user control
Change-Id: Iab1413a83adf90461feb5d6416aad174439392ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116715
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
(cherry picked from commit f43fdcad400b6ff51f0810d923fe75d5a2cfde0c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117414
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sfx2/source/sidebar/SidebarController.cxx')
-rw-r--r-- | sfx2/source/sidebar/SidebarController.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index 98c8acbc6c67..c91381d01db9 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -136,6 +136,7 @@ SidebarController::SidebarController ( maRequestedContext(), mnRequestedForceFlags(SwitchFlag_NoForce), mnMaximumSidebarWidth(officecfg::Office::UI::Sidebar::General::MaximumWidth::get()), + mbMinimumSidebarWidth(officecfg::Office::UI::Sidebar::General::MinimumWidth::get()), msCurrentDeckId(gsDefaultDeckId), maPropertyChangeForwarder([this](){ return this->BroadcastPropertyChange(); }), maContextChangeUpdate([this](){ return this->UpdateConfigurations(); }), @@ -376,7 +377,7 @@ void SAL_CALL SidebarController::requestLayout() if (mpCurrentDeck && !mpCurrentDeck->isDisposed()) { mpCurrentDeck->RequestLayout(); - nMinimalWidth = mpCurrentDeck->GetMinimalWidth(); + nMinimalWidth = mbMinimumSidebarWidth ? mpCurrentDeck->GetMinimalWidth() : 0; } RestrictWidth(nMinimalWidth); } @@ -471,7 +472,7 @@ void SidebarController::NotifyResize() VclPtr<DeckTitleBar> pTitleBar = mpCurrentDeck->GetTitleBar(); if (pTitleBar && pTitleBar->IsVisible()) pTitleBar->SetCloserVisible(CanModifyChildWindowWidth()); - nMinimalWidth = mpCurrentDeck->GetMinimalWidth(); + nMinimalWidth = mbMinimumSidebarWidth ? mpCurrentDeck->GetMinimalWidth() : 0; } RestrictWidth(nMinimalWidth); |