diff options
author | Mike Antipov <mantipov@productengine.com> | 2009-11-13 18:58:23 +0200 |
---|---|---|
committer | Mike Antipov <mantipov@productengine.com> | 2009-11-13 18:58:23 +0200 |
commit | 8a0341f42e2ba3a91a3ad5bc355966b07ac6801f (patch) | |
tree | ff8fd37e37f11b20f439fadd4ce51f1780d9c9da /indra/newview/llbottomtray.cpp | |
parent | f9d3791aaf12e89fdf6a57c57276e57e8193de9b (diff) |
Work on major sub-task EXT-991 (Update bottom bar behavior on resize)
Fixed issue: "Snapshort button can appear first due to its the least width while Bottom Bar extending"
- implemented ordering in which buttons can be shown: Gesture, Move, View, Snapshot.
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llbottomtray.cpp')
-rw-r--r-- | indra/newview/llbottomtray.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index dd06959472..fd711b72b0 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -696,7 +696,26 @@ bool LLBottomTray::canButtonBeShown(EResizeState processed_object_type) const bool can_be_shown = mResizeState & processed_object_type; if (can_be_shown) { - // *TODO: mantipov: synchronize with situation when button was hidden via context menu; + static MASK MOVEMENT_PREVIOUS_BUTTONS_MASK = RS_BUTTON_GESTURES; + static MASK CAMERA_PREVIOUS_BUTTONS_MASK = RS_BUTTON_GESTURES | RS_BUTTON_MOVEMENT; + static MASK SNAPSHOT_PREVIOUS_BUTTONS_MASK = RS_BUTTON_GESTURES | RS_BUTTON_MOVEMENT | RS_BUTTON_CAMERA; + + switch(processed_object_type) + { + case RS_BUTTON_GESTURES: // Gestures should be shown first + break; + case RS_BUTTON_MOVEMENT: // Move only if gesture is shown + can_be_shown = !(MOVEMENT_PREVIOUS_BUTTONS_MASK & mResizeState); + break; + case RS_BUTTON_CAMERA: + can_be_shown = !(CAMERA_PREVIOUS_BUTTONS_MASK & mResizeState); + break; + case RS_BUTTON_SNAPSHOT: + can_be_shown = !(SNAPSHOT_PREVIOUS_BUTTONS_MASK & mResizeState); + break; + default: // nothing to do here + break; + } } return can_be_shown; } |