summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorHeiko Tietze <tietze.heiko@gmail.com>2021-06-04 14:42:58 +0200
committerAndras Timar <andras.timar@collabora.com>2021-06-23 21:04:57 +0200
commit8656c173f6f1c1200ab79922a8a0bffc1579b683 (patch)
tree678b73924ffa30b92d709cd9d2523ebe735e5d0f /sfx2
parent69a322ab73d27d2b79f225c2af1bd8f010f4290f (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')
-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 c120a9cc301c..90ddc0b6c6d4 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -138,6 +138,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(); }),
@@ -379,7 +380,7 @@ void SAL_CALL SidebarController::requestLayout()
if (mpCurrentDeck && !mpCurrentDeck->isDisposed())
{
mpCurrentDeck->RequestLayout();
- nMinimalWidth = mpCurrentDeck->GetMinimalWidth();
+ nMinimalWidth = mbMinimumSidebarWidth ? mpCurrentDeck->GetMinimalWidth() : 0;
}
RestrictWidth(nMinimalWidth);
}
@@ -474,7 +475,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);