Kaydet (Commit) c9a7c435 authored tarafından Aditya's avatar Aditya Kaydeden (comit) Mike Kaganski

tdf#120086: Patch for TAB-ing order of Gallery sidebar panel

The current TAB-ing order of Gallery sidebar panel is not sequential
and the order needed to be changed. This patch fixes the TAB-ing order
of the gallery sidebar panel to a more sequential and convenient one.
It also fixes the reverse TAB-ing order (Shift+TAB).

Change-Id: Ib0b22ccef1fa4676e535f42a794fb7c836741d0b
Reviewed-on: https://gerrit.libreoffice.org/65907Reviewed-by: 's avatarJim Raykowski <raykowj@gmail.com>
Tested-by: 's avatarMike Kaganski <mike.kaganski@collabora.com>
üst 850fb2ac
......@@ -185,25 +185,35 @@ bool GalleryControl::GalleryKeyInput( const KeyEvent& rKEvt )
{
if( !rKEvt.GetKeyCode().IsShift() )
{
if( mpBrowser1->mpThemes->HasChildPathFocus( true ) )
mpBrowser2->GetViewWindow()->GrabFocus();
else if( mpBrowser2->GetViewWindow()->HasFocus() )
if( mpBrowser1->maNewTheme->HasFocus() )
mpBrowser1->mpThemes->GrabFocus();
else if( mpBrowser1->mpThemes->HasChildPathFocus( true ) )
mpBrowser2->maViewBox->GrabFocus();
else if( mpBrowser2->maViewBox->HasFocus() )
mpBrowser1->maNewTheme->GrabFocus();
mpBrowser2->GetViewWindow()->GrabFocus();
else
mpBrowser1->mpThemes->GrabFocus();
{
if( mpBrowser1->maNewTheme->IsEnabled() )
mpBrowser1->maNewTheme->GrabFocus();
else
mpBrowser1->mpThemes->GrabFocus();
}
}
else
{
if( mpBrowser1->mpThemes->HasChildPathFocus( true ) )
mpBrowser1->maNewTheme->GrabFocus();
else if( mpBrowser1->maNewTheme->HasFocus() )
if( mpBrowser2->GetViewWindow()->HasFocus() )
mpBrowser2->maViewBox->GrabFocus();
else if( mpBrowser2->maViewBox->HasFocus() )
mpBrowser2->GetViewWindow()->GrabFocus();
else
mpBrowser1->mpThemes->GrabFocus();
else if( mpBrowser1->mpThemes->HasChildPathFocus( true ) )
{
if( mpBrowser1->maNewTheme->IsEnabled() )
mpBrowser1->maNewTheme->GrabFocus();
else
mpBrowser2->GetViewWindow()->GrabFocus();
}
else
mpBrowser2->GetViewWindow()->GrabFocus();
}
}
......
......@@ -410,7 +410,9 @@ void GalleryBrowser1::Resize()
void GalleryBrowser1::GetFocus()
{
Control::GetFocus();
if( mpThemes )
if( maNewTheme->IsEnabled() )
maNewTheme->GrabFocus();
else
mpThemes->GrabFocus();
}
......
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