summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorHeiko Tietze <tietze.heiko@gmail.com>2021-06-04 14:42:58 +0200
committerHeiko Tietze <heiko.tietze@documentfoundation.org>2021-06-07 07:45:58 +0200
commitf43fdcad400b6ff51f0810d923fe75d5a2cfde0c (patch)
treeaca59074f4bb3365899a201f605a28a3e7560415 /sfx2
parentc617b11ff37a18225f9666b7d028a734d12b360a (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>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/sidebar/SidebarController.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index c363e4980cb2..3ca7ca9655f1 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -125,6 +125,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(); }),
@@ -404,7 +405,7 @@ void SAL_CALL SidebarController::requestLayout()
if (mpCurrentDeck && !mpCurrentDeck->isDisposed())
{
mpCurrentDeck->RequestLayout();
- nMinimalWidth = mpCurrentDeck->GetMinimalWidth();
+ nMinimalWidth = mbMinimumSidebarWidth ? mpCurrentDeck->GetMinimalWidth() : 0;
}
RestrictWidth(nMinimalWidth);
}
@@ -498,7 +499,7 @@ void SidebarController::NotifyResize()
DeckTitleBar* pTitleBar = mpCurrentDeck->GetTitleBar();
if (pTitleBar && pTitleBar->GetVisible())
pTitleBar->SetCloserVisible(CanModifyChildWindowWidth());
- nMinimalWidth = mpCurrentDeck->GetMinimalWidth();
+ nMinimalWidth = mbMinimumSidebarWidth ? mpCurrentDeck->GetMinimalWidth() : 0;
}
RestrictWidth(nMinimalWidth);