diff options
author | Vadim ProductEngine <vsavchuk@productengine.com> | 2011-03-04 19:10:54 +0200 |
---|---|---|
committer | Vadim ProductEngine <vsavchuk@productengine.com> | 2011-03-04 19:10:54 +0200 |
commit | 176b025a26e11fa9133a4a4c9fbc2cfa4f7cf616 (patch) | |
tree | 575a1d30158e7d0d11de79c830bf4410c4b57dd4 /indra/newview/llbottomtray.cpp | |
parent | 211465b77282ec5981f8b052c9ff8d4277a10d5f (diff) |
STORM-236 WIP Additional fixes.
Fixed:
* Wrong ability to place a button between the chat input and the drag handle (thanks Wolfpup!).
* Broken drag-n-drop cursors.
Diffstat (limited to 'indra/newview/llbottomtray.cpp')
-rw-r--r-- | indra/newview/llbottomtray.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 7139b0ea0e..d8ec4b605c 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -72,9 +72,6 @@ BOOL LLBottomtrayButton::handleHover(S32 x, S32 y, MASK mask) localPointToScreen(x, y, &screenX, &screenY); LLBottomTray::getInstance()->onDraggableButtonHover(screenX, screenY); - // Reset cursor in case you move your mouse from the drag handle to a button. - getWindow()->setCursor(UI_CURSOR_ARROW); - return TRUE; } else @@ -204,6 +201,7 @@ LLBottomTray::LLBottomTray(const LLSD&) mSpeakBtn(NULL), mNearbyChatBar(NULL), mChatBarContainer(NULL), + mNearbyCharResizeHandlePanel(NULL), mToolbarStack(NULL), mMovementButton(NULL), mResizeState(RS_NORESIZE), @@ -554,6 +552,7 @@ BOOL LLBottomTray::postBuild() LLHints::registerHintTarget("chat_bar", mNearbyChatBar->LLView::getHandle()); mChatBarContainer = getChild<LLLayoutPanel>("chat_bar_layout_panel"); + mNearbyCharResizeHandlePanel = getChild<LLPanel>("chat_bar_resize_handle_panel"); mToolbarStack = getChild<LLLayoutStack>("toolbar_stack"); mMovementButton = getChild<LLButton>("movement_btn"); @@ -672,12 +671,20 @@ void LLBottomTray::onDraggableButtonHover(S32 x, S32 y) gViewerWindow->getWindow()->setCursor(UI_CURSOR_NO); } } + else + { + // Reset cursor in case you move your mouse from the drag handle to a button. + getWindow()->setCursor(UI_CURSOR_ARROW); + + } } bool LLBottomTray::isCursorOverDraggableArea(S32 x, S32 y) { + // Draggable area lasts from the nearby chat input resize handle + // to the chiclet area (exlusively). bool result = getRect().pointInRect(x, y); - result = result && mNearbyChatBar->calcScreenRect().mRight < x; + result = result && mNearbyCharResizeHandlePanel->calcScreenRect().mRight < x; result = result && mChicletPanel->calcScreenRect().mRight > x; return result; } |