[Libreoffice-commits] core.git: include/sfx2 officecfg/registry sfx2/source
Heiko Tietze (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jun 7 05:46:31 UTC 2021
include/sfx2/sidebar/SidebarController.hxx | 1 +
officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs | 7 +++++++
sfx2/source/sidebar/SidebarController.cxx | 5 +++--
3 files changed, 11 insertions(+), 2 deletions(-)
New commits:
commit f43fdcad400b6ff51f0810d923fe75d5a2cfde0c
Author: Heiko Tietze <tietze.heiko at gmail.com>
AuthorDate: Fri Jun 4 14:42:58 2021 +0200
Commit: Heiko Tietze <heiko.tietze at documentfoundation.org>
CommitDate: Mon Jun 7 07:45:58 2021 +0200
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 at gmail.com>
diff --git a/include/sfx2/sidebar/SidebarController.hxx b/include/sfx2/sidebar/SidebarController.hxx
index 7c0b4294ad18..48d595722717 100644
--- a/include/sfx2/sidebar/SidebarController.hxx
+++ b/include/sfx2/sidebar/SidebarController.hxx
@@ -190,6 +190,7 @@ private:
/// Use a combination of SwitchFlag_* as value.
sal_Int32 mnRequestedForceFlags;
sal_Int32 mnMaximumSidebarWidth;
+ bool mbMinimumSidebarWidth;
OUString msCurrentDeckId;
AsynchronousCall maPropertyChangeForwarder;
AsynchronousCall maContextChangeUpdate;
diff --git a/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs b/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs
index 9fbb0fbbcbee..e4aad7f551d2 100644
--- a/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs
@@ -250,6 +250,13 @@
</info>
<value>500</value>
</prop>
+ <prop oor:name="MinimumWidth" oor:type="xs:boolean" oor:nillable="false">
+ <info>
+ <desc>Minimum width the sidebar can have. If true, the minumum width
+ is calculated from the largest deck.</desc>
+ </info>
+ <value>true</value>
+ </prop>
</group>
<group oor:name="Content">
<info>
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);
More information about the Libreoffice-commits
mailing list