diff options
author | Paul Guslisty <pguslisty@productengine.com> | 2010-08-06 18:50:24 +0300 |
---|---|---|
committer | Paul Guslisty <pguslisty@productengine.com> | 2010-08-06 18:50:24 +0300 |
commit | 593a6f0bbf25877f7e3b7482d8644cf34840f923 (patch) | |
tree | d0995a07d05a0f6c7ec44520a2ab416993a597bb /indra | |
parent | ad567ec19db66aabc1e0ee950dc80620a50a4833 (diff) |
EXT-8207 FIXED (Unexpected camera zoom occures if scroll location history drop-down list by mouse wheel)
Added parameter for scroll list control that determines opaque of mouse scroll wheel event. Set this parameter to \"true\" in combobox of navigation panel.
Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/829/
--HG--
branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llui/llscrolllistctrl.cpp | 8 | ||||
-rw-r--r-- | indra/llui/llscrolllistctrl.h | 4 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_navigation_bar.xml | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/widgets/scroll_list.xml | 1 |
4 files changed, 14 insertions, 1 deletions
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index d4d161f2c9..bb43c19c2c 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -135,6 +135,7 @@ LLScrollListCtrl::Params::Params() search_column("search_column", 0), sort_column("sort_column", -1), sort_ascending("sort_ascending", true), + mouse_wheel_opaque("mouse_wheel_opaque", false), commit_on_keyboard_movement("commit_on_keyboard_movement", true), heading_height("heading_height"), page_lines("page_lines", 0), @@ -163,6 +164,7 @@ LLScrollListCtrl::LLScrollListCtrl(const LLScrollListCtrl::Params& p) : LLUICtrl(p), mLineHeight(0), mScrollLines(0), + mMouseWheelOpaque(p.mouse_wheel_opaque), mPageLines(p.page_lines), mMaxSelectable(0), mAllowKeyboardMovement(TRUE), @@ -1536,6 +1538,12 @@ BOOL LLScrollListCtrl::handleScrollWheel(S32 x, S32 y, S32 clicks) BOOL handled = FALSE; // Pretend the mouse is over the scrollbar handled = mScrollbar->handleScrollWheel( 0, 0, clicks ); + + if (mMouseWheelOpaque) + { + return TRUE; + } + return handled; } diff --git a/indra/llui/llscrolllistctrl.h b/indra/llui/llscrolllistctrl.h index 1f0ef585db..19cb7e2bfe 100644 --- a/indra/llui/llscrolllistctrl.h +++ b/indra/llui/llscrolllistctrl.h @@ -102,7 +102,8 @@ public: { // behavioral flags Optional<bool> multi_select, - commit_on_keyboard_movement; + commit_on_keyboard_movement, + mouse_wheel_opaque; // display flags Optional<bool> has_border, @@ -449,6 +450,7 @@ private: BOOL mCommitOnSelectionChange; BOOL mSelectionChanged; BOOL mNeedsScroll; + BOOL mMouseWheelOpaque; BOOL mCanSelect; const BOOL mDisplayColumnHeaders; BOOL mColumnsDirty; diff --git a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml index 2c9d7e4b6a..082d51ed3c 100644 --- a/indra/newview/skins/default/xui/en/panel_navigation_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_navigation_bar.xml @@ -97,6 +97,8 @@ name="location_combo" top_delta="0" width="266"> + <combo_list + mouse_wheel_opaque="true"/> <!-- *TODO: Delete. Let the location_input use the correct art sizes. <location_input.add_landmark_button height="18" diff --git a/indra/newview/skins/default/xui/en/widgets/scroll_list.xml b/indra/newview/skins/default/xui/en/widgets/scroll_list.xml index 63166f32b7..66167f5fad 100644 --- a/indra/newview/skins/default/xui/en/widgets/scroll_list.xml +++ b/indra/newview/skins/default/xui/en/widgets/scroll_list.xml @@ -12,6 +12,7 @@ draw_stripes="true" scroll_bar_bg_visible="false" scroll_bar_bg_color="black" + scroll_wheel_opaque="false" background_visible="true" heading_height="23" draw_border="false" |