Kaydet (Commit) e3bd10f8 authored tarafından Caolán McNamara's avatar Caolán McNamara

adjust the hide of the zoom so its dynamic on docking/undocking navigators

Change-Id: I525d0abf5618ffc2f614857a29e530f7140c0de7
üst b37ac489
......@@ -261,6 +261,8 @@ public:
virtual void dispose() override;
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
virtual void StateChanged(StateChangedType nStateChange) override;
};
class ScNavigatorDialogWrapper: public SfxChildWindowContext
......
......@@ -529,13 +529,6 @@ ScNavigatorDlg::ScNavigatorDlg(SfxBindings* pB, vcl::Window* pParent)
aContentIdle.SetInvokeHandler( LINK( this, ScNavigatorDlg, TimeHdl ) );
aContentIdle.SetPriority( TaskPriority::LOWEST );
if (!SfxChildWindowContext::GetFloatingWindow(GetParent()))
{
// When the navigator is displayed in the sidebar, or is otherwise
// docked, it has the whole deck to fill. Therefore hide the button that
// hides all controls below the top two rows of buttons.
aTbxCmd->RemoveItem(aTbxCmd->GetItemPos(nZoomId));
}
aLbEntries->SetNavigatorDlgFlag(true);
// if scenario was active, switch on
......@@ -549,6 +542,18 @@ ScNavigatorDlg::ScNavigatorDlg(SfxBindings* pB, vcl::Window* pParent)
aExpandedSize = GetOptimalSize();
}
void ScNavigatorDlg::StateChanged(StateChangedType nStateChange)
{
PanelLayout::StateChanged(nStateChange);
if (nStateChange == StateChangedType::InitShow)
{
// When the navigator is displayed in the sidebar, or is otherwise
// docked, it has the whole deck to fill. Therefore hide the button that
// hides all controls below the top two rows of buttons.
aTbxCmd->ShowItem(aTbxCmd->GetItemId(nZoomId), SfxChildWindowContext::GetFloatingWindow(GetParent()));
}
}
ScNavigatorDlg::~ScNavigatorDlg()
{
disposeOnce();
......
......@@ -119,8 +119,6 @@ class SwNavigationPI : public PanelLayout,
void SetPopupWindow( SfxPopupWindow* );
using Window::StateChanged;
protected:
// release ObjectShellLock early enough for app end
......@@ -142,6 +140,8 @@ public:
virtual void StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pState ) override;
virtual void StateChanged(StateChangedType nStateChange) override;
static OUString CreateDropFileName( TransferableDataHelper& rData );
static OUString CleanEntry(const OUString& rEntry);
......
......@@ -728,15 +728,6 @@ SwNavigationPI::SwNavigationPI(SfxBindings* _pBindings,
m_aGlobalTree->SetAccessibleName(SW_RESSTR(STR_ACCESS_TL_GLOBAL));
m_aDocListBox->SetAccessibleName(m_aStatusArr[3]);
if (!SfxChildWindowContext::GetFloatingWindow(GetParent()))
{
// if the parent isn't a float, then then the navigator is displayed in
// the sidebar or is otherwise docked. While the navigator could change
// its size, the sidebar can not, and the navigator would just waste
// space. Therefore hide this button.
m_aContentToolBox->RemoveItem(m_aContentToolBox->GetItemPos(m_aContentToolBox->GetItemId("listbox")));
}
m_aExpandedSize = GetOptimalSize();
}
......@@ -849,6 +840,19 @@ void SwNavigationPI::StateChanged( sal_uInt16 nSID, SfxItemState /*eState*/,
}
}
void SwNavigationPI::StateChanged(StateChangedType nStateChange)
{
PanelLayout::StateChanged(nStateChange);
if (nStateChange == StateChangedType::InitShow)
{
// if the parent isn't a float, then then the navigator is displayed in
// the sidebar or is otherwise docked. While the navigator could change
// its size, the sidebar can not, and the navigator would just waste
// space. Therefore hide this button.
m_aContentToolBox->ShowItem(m_aContentToolBox->GetItemId("listbox"), SfxChildWindowContext::GetFloatingWindow(GetParent()));
}
}
// Get the numeric field from the toolbox.
NumEditAction& SwNavigationPI::GetPageEdit()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment