diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2023-10-03 19:11:06 +0300 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2023-10-03 19:25:19 +0300 |
commit | d4123ec30d9a5daa96b28f2b8a3cc36ccd7e9cb1 (patch) | |
tree | ddbaeb2e54ec30877a306eb7b355a787a56b3d32 /indra/llui/lltabcontainer.cpp | |
parent | 51f904e4a7d7e5d04be09991f859bd1b26f0d7ae (diff) | |
parent | 2465470817957c8378e81ec1a7e32551fbac7b26 (diff) |
Merge branch 'main' into DRTVWR-587-maint-V
# Conflicts:
# indra/newview/llinventorymodel.cpp
# indra/newview/llvovolume.cpp
Diffstat (limited to 'indra/llui/lltabcontainer.cpp')
-rw-r--r-- | indra/llui/lltabcontainer.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index f48fc567b2..cb36f72f6e 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -605,6 +605,7 @@ BOOL LLTabContainer::handleMouseDown( S32 x, S32 y, MASK mask ) LLButton* tab_button = getTab(index)->mButton; gFocusMgr.setMouseCapture(this); tab_button->setFocus(TRUE); + mMouseDownTimer.start(); } } if (handled) { @@ -653,7 +654,11 @@ BOOL LLTabContainer::handleHover( S32 x, S32 y, MASK mask ) handled = LLPanel::handleHover(x, y, mask); } - commitHoveredButton(x, y); + F32 drag_delay = 0.25f; // filter out clicks from dragging + if (mMouseDownTimer.getElapsedTimeF32() > drag_delay) + { + commitHoveredButton(x, y); + } return handled; } @@ -699,6 +704,7 @@ BOOL LLTabContainer::handleMouseUp( S32 x, S32 y, MASK mask ) } commitHoveredButton(x, y); + mMouseDownTimer.stop(); LLPanel* cur_panel = getCurrentPanel(); if (hasMouseCapture()) { @@ -1002,7 +1008,7 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel) } else { - //Scip tab button space if they are invisible(EXT - 576) + // Skip tab button space if tabs are invisible (EXT-576) tab_panel_top = getRect().getHeight(); tab_panel_bottom = LLPANEL_BORDER_WIDTH; } @@ -1017,9 +1023,9 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel) } else { - tab_panel_rect = LLRect(LLPANEL_BORDER_WIDTH, + tab_panel_rect = LLRect(LLPANEL_BORDER_WIDTH * 3, tab_panel_top, - getRect().getWidth()-LLPANEL_BORDER_WIDTH, + getRect().getWidth() - LLPANEL_BORDER_WIDTH * 2, tab_panel_bottom ); } child->setFollowsAll(); @@ -1106,7 +1112,7 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel) p.follows.flags = p.follows.flags() | FOLLOWS_TOP; } else - { + { p.name("htab_"+std::string(child->getName())); p.visible(false); p.image_unselected(tab_img); |