diff options
author | Akshay Deep <akshaydeepiitr@gmail.com> | 2016-06-19 14:38:54 +0530 |
---|---|---|
committer | Akshay Deep <akshaydeepiitr@gmail.com> | 2016-06-23 07:09:13 +0000 |
commit | 596065ff05165f5b59cfcfdcee09166931455e19 (patch) | |
tree | 9bcdab619182f085aa00611caa493e244794c6bf /sfx2/source/dialog/backingwindow.cxx | |
parent | 2c1056d679187a702bad3a2ba5dcb6b068e1aa5e (diff) |
GSoC tdf#87697 START CENTER: Indicate selected thumbnailview
Added new "Active" state to PushButton class
Active state used in MenuToggleButton class.
Active => Pressed + Flyover
When hovered in Active state, Active => Flyover only
Change-Id: Iece1550b6d742a7ab3c9f4c7516ec855e1a1b6ef
Reviewed-on: https://gerrit.libreoffice.org/26470
Reviewed-by: Akshay Deep <akshaydeepiitr@gmail.com>
Tested-by: Akshay Deep <akshaydeepiitr@gmail.com>
Diffstat (limited to 'sfx2/source/dialog/backingwindow.cxx')
-rw-r--r-- | sfx2/source/dialog/backingwindow.cxx | 12 |
1 files changed, 11 insertions, 1 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(); } } |