diff options
author | Aditya <adityasahu1511@gmail.com> | 2019-01-07 01:37:34 +0530 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-01-09 08:06:52 +0100 |
commit | c9a7c4358d902900eb0fe66db36e283dc8df0336 (patch) | |
tree | 5920202937449149dafb2c729564a4f8a16ef2f4 | |
parent | 850fb2ac2d89e68570db840bab65ac46df9d4314 (diff) |
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/65907
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
-rwxr-xr-x[-rw-r--r--] | svx/source/gallery2/GalleryControl.cxx | 30 | ||||
-rwxr-xr-x[-rw-r--r--] | svx/source/gallery2/galbrws1.cxx | 4 |
2 files changed, 23 insertions, 11 deletions
diff --git a/svx/source/gallery2/GalleryControl.cxx b/svx/source/gallery2/GalleryControl.cxx index d41c3e803bdb..f54034aa88da 100644..100755 --- a/svx/source/gallery2/GalleryControl.cxx +++ b/svx/source/gallery2/GalleryControl.cxx @@ -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(); } } diff --git a/svx/source/gallery2/galbrws1.cxx b/svx/source/gallery2/galbrws1.cxx index 416fa67f48e7..8c54ac56de4b 100644..100755 --- a/svx/source/gallery2/galbrws1.cxx +++ b/svx/source/gallery2/galbrws1.cxx @@ -410,7 +410,9 @@ void GalleryBrowser1::Resize() void GalleryBrowser1::GetFocus() { Control::GetFocus(); - if( mpThemes ) + if( maNewTheme->IsEnabled() ) + maNewTheme->GrabFocus(); + else mpThemes->GrabFocus(); } |