SL-16022 Fixed Tab not cycling through all options

master
Andrey Kleshchev 2021-09-21 21:55:12 +03:00
parent 7c00db9e0e
commit 1d6bfb727a
5 changed files with 31 additions and 4 deletions

View File

@ -1363,6 +1363,9 @@ public:
virtual BOOL handleKeyHere(KEY key, MASK mask);
virtual BOOL handleAcceleratorKey(KEY key, MASK mask);
virtual void onFocusLost();
virtual void setFocus(BOOL b);
};
LLMenuItemBranchDownGL::LLMenuItemBranchDownGL( const Params& p) :
@ -1517,6 +1520,21 @@ BOOL LLMenuItemBranchDownGL::handleAcceleratorKey(KEY key, MASK mask)
return handled;
}
void LLMenuItemBranchDownGL::onFocusLost()
{
// needed for tab-based selection
LLMenuItemBranchGL::onFocusLost();
LLMenuGL::setKeyboardMode(FALSE);
setHighlight(FALSE);
}
void LLMenuItemBranchDownGL::setFocus(BOOL b)
{
// needed for tab-based selection
LLMenuItemBranchGL::setFocus(b);
LLMenuGL::setKeyboardMode(b);
setHighlight(b);
}
BOOL LLMenuItemBranchDownGL::handleKeyHere(KEY key, MASK mask)
{

View File

@ -2231,6 +2231,7 @@ void LLViewerWindow::initWorldUI()
gStatusBar->setShape(status_bar_container->getLocalRect());
// sync bg color with menu bar
gStatusBar->setBackgroundColor( gMenuBarView->getBackgroundColor().get() );
// add InBack so that gStatusBar won't be drawn over menu
status_bar_container->addChildInBack(gStatusBar);
status_bar_container->setVisible(TRUE);

View File

@ -8,6 +8,15 @@
tab_stop="false"
name="main_view"
width="1024">
<!-- At the moment layout_stack is not an LLUICtrl,
but Tab requires focus_root to function and focus_root
functionality is implemented in LLUICtrl -->
<panel follows="all"
height="768"
name="menu_tab_wrapper"
focus_root="true"
top="0">
<layout_stack border_size="0"
follows="all"
mouse_opaque="false"
@ -18,12 +27,12 @@
<layout_panel mouse_opaque="true"
follows="left|right|top"
name="status_bar_container"
tab_stop="false"
height="19"
left="0"
top="0"
width="1024"
auto_resize="false"
default_tab_group="1"
visible="true">
<view mouse_opaque="false"
follows="all"
@ -31,13 +40,13 @@
left="0"
top="0"
width="1024"
tab_group="1"
height="19"/>
</layout_panel>
<layout_panel auto_resize="false"
height="34"
mouse_opaque="false"
name="nav_bar_container"
tab_stop="false"
width="1024"
visible="false"/>
<layout_panel auto_resize="true"
@ -99,6 +108,7 @@
tab_stop="false"/>
</layout_panel>
</layout_stack>
</panel> <!--menu_tab_wrapper-->
<panel top="0"
follows="all"

View File

@ -4,7 +4,6 @@
background_visible="true"
bg_opaque_color="MouseGray"
follows="left|top|right"
focus_root="true"
height="34"
layout="topleft"
name="navigation_bar"

View File

@ -11,7 +11,6 @@
mouse_opaque="false"
name="status"
top="19"
tab_stop="false"
width="1000">
<panel.string
name="packet_loss_tooltip">