diff options
-rw-r--r-- | include/sfx2/sidebar/SidebarController.hxx | 1 | ||||
-rw-r--r-- | officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs | 7 | ||||
-rw-r--r-- | sfx2/source/sidebar/SidebarController.cxx | 5 |
3 files changed, 11 insertions, 2 deletions
diff --git a/include/sfx2/sidebar/SidebarController.hxx b/include/sfx2/sidebar/SidebarController.hxx index d03576b3416d..a1b7b4e44b11 100644 --- a/include/sfx2/sidebar/SidebarController.hxx +++ b/include/sfx2/sidebar/SidebarController.hxx @@ -185,6 +185,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 6ed1d79d80cf..c54c3d6076c0 100644 --- a/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/UI/Sidebar.xcs @@ -242,6 +242,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 b890f9950f56..82aed33efcbf 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -135,6 +135,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(); }), @@ -359,7 +360,7 @@ void SAL_CALL SidebarController::requestLayout() if (mpCurrentDeck && !mpCurrentDeck->isDisposed()) { mpCurrentDeck->RequestLayout(); - nMinimalWidth = mpCurrentDeck->GetMinimalWidth(); + nMinimalWidth = mbMinimumSidebarWidth ? mpCurrentDeck->GetMinimalWidth() : 0; } RestrictWidth(nMinimalWidth); } @@ -454,7 +455,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); |