diff options
Diffstat (limited to 'sfx2/source/dialog')
-rw-r--r-- | sfx2/source/dialog/backingwindow.cxx | 12 | ||||
-rw-r--r-- | sfx2/source/dialog/backingwindow.hxx | 6 |
2 files changed, 14 insertions, 4 deletions
diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index 9c054d56f633..ef27a2dc02f2 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -256,6 +256,7 @@ void BackingWindow::initControls() mpAllRecentThumbnails->mnFileTypes |= TYPE_OTHER; mpAllRecentThumbnails->Reload(); mpAllRecentThumbnails->ShowTooltips( true ); + mpRecentButton->SetActive(true); //initialize Template view mpLocalView->SetStyle( mpLocalView->GetStyle() | WB_VSCROLL); @@ -345,7 +346,7 @@ void BackingWindow::setupButton( PushButton* pButton ) pButton->SetClickHdl( LINK( this, BackingWindow, ClickHdl ) ); } -void BackingWindow::setupButton( MenuButton* pButton ) +void BackingWindow::setupButton( MenuToggleButton* pButton ) { vcl::Font aFont(pButton->GetSettings().GetStyleSettings().GetPushButtonFont()); aFont.SetFontSize(Size(0, aFont.GetFontSize().Height() * fMultiplier)); @@ -595,6 +596,9 @@ IMPL_LINK_TYPED( BackingWindow, ClickHdl, Button*, pButton, void ) mpLocalView->Hide(); mpAllRecentThumbnails->Show(); mpAllRecentThumbnails->GrabFocus(); + mpRecentButton->SetActive(true); + mpTemplateButton->SetActive(false); + mpTemplateButton->Invalidate(); } else if( pButton == mpTemplateButton ) { @@ -604,6 +608,9 @@ IMPL_LINK_TYPED( BackingWindow, ClickHdl, Button*, pButton, void ) mpLocalView->Show(); mpLocalView->reload(); mpLocalView->GrabFocus(); + mpRecentButton->SetActive(false); + mpRecentButton->Invalidate(); + mpTemplateButton->SetActive(true); } } @@ -654,6 +661,9 @@ IMPL_LINK_TYPED( BackingWindow, MenuSelectHdl, MenuButton*, pButton, void ) mpLocalView->Show(); mpLocalView->reload(); mpLocalView->GrabFocus(); + mpRecentButton->SetActive(false); + mpTemplateButton->SetActive(true); + mpRecentButton->Invalidate(); } } diff --git a/sfx2/source/dialog/backingwindow.hxx b/sfx2/source/dialog/backingwindow.hxx index 4c80c9f5ba31..499d8b3dc367 100644 --- a/sfx2/source/dialog/backingwindow.hxx +++ b/sfx2/source/dialog/backingwindow.hxx @@ -59,9 +59,9 @@ class BackingWindow : public vcl::Window, public VclBuilderContainer css::uno::Reference<css::datatransfer::dnd::XDropTargetListener> mxDropTargetListener; VclPtr<PushButton> mpOpenButton; - VclPtr<MenuButton> mpRecentButton; + VclPtr<MenuToggleButton> mpRecentButton; VclPtr<PushButton> mpRemoteButton; - VclPtr<MenuButton> mpTemplateButton; + VclPtr<MenuToggleButton> mpTemplateButton; VclPtr<FixedText> mpCreateLabel; @@ -93,7 +93,7 @@ class BackingWindow : public vcl::Window, public VclBuilderContainer std::unique_ptr<svt::AcceleratorExecute> mpAccExec; void setupButton(PushButton* pButton); - void setupButton(MenuButton* pButton); + void setupButton(MenuToggleButton* pButton); void dispatchURL(const OUString& i_rURL, const OUString& i_rTarget = OUString("_default"), |