From 5bb98a395482927a5dbe68cb6888b0b116ffea67 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Mon, 13 Sep 2010 18:06:12 +0300 Subject: STORM-123 FIXED Fixed resize availability of nearby chat in bottomtray. Cursor didn't change to "resize" state, because handlehover of bottomtray wasn't working correctly. It happened because LLPanel::handleHover() wasn't called in LLBottomtray::handleHover(). - There was no good reason to override habdleHover() in LLBottomTray so new method onDraggableButtonHover() was introduced to be called from bottomtray buttons(as it was already done for mouse up and down). --- indra/newview/llbottomtray.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'indra/newview/llbottomtray.cpp') diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index f3ade83d00..d7a38d39cb 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -67,7 +67,7 @@ BOOL LLBottomtrayButton::handleHover(S32 x, S32 y, MASK mask) S32 screenX, screenY; localPointToScreen(x, y, &screenX, &screenY); // pass hover to bottomtray - LLBottomTray::getInstance()->handleHover(screenX, screenY, mask); + LLBottomTray::getInstance()->onDraggableButtonHover(screenX, screenY, mask); return FALSE; } //virtual @@ -607,7 +607,7 @@ LLPanel* LLBottomTray::findChildPanelByLocalCoords(S32 x, S32 y) return ctrl; } -BOOL LLBottomTray::handleHover(S32 x, S32 y, MASK mask) +void LLBottomTray::onDraggableButtonHover(S32 x, S32 y, MASK mask) { // if mouse down on draggable item was done, check whether we should start DnD if (mCheckForDrag) @@ -634,8 +634,6 @@ BOOL LLBottomTray::handleHover(S32 x, S32 y, MASK mask) gViewerWindow->getWindow()->setCursor(UI_CURSOR_NO); } } - - return TRUE; } bool LLBottomTray::isCursorOverDraggableArea(S32 x, S32 y) -- cgit v1.2.3 From 026b2abf91bb377b4d4df0e28bbd92476144c6e4 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Mon, 13 Sep 2010 18:19:59 +0300 Subject: Little refactoring. Removed unused "mask" arguments from three sidetray methods. --- indra/newview/llbottomtray.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview/llbottomtray.cpp') diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index d7a38d39cb..52b25edf60 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -67,7 +67,7 @@ BOOL LLBottomtrayButton::handleHover(S32 x, S32 y, MASK mask) S32 screenX, screenY; localPointToScreen(x, y, &screenX, &screenY); // pass hover to bottomtray - LLBottomTray::getInstance()->onDraggableButtonHover(screenX, screenY, mask); + LLBottomTray::getInstance()->onDraggableButtonHover(screenX, screenY); return FALSE; } //virtual @@ -76,7 +76,7 @@ BOOL LLBottomtrayButton::handleMouseUp(S32 x, S32 y, MASK mask) S32 screenX, screenY; localPointToScreen(x, y, &screenX, &screenY); // pass mouse up to bottomtray - LLBottomTray::getInstance()->onDraggableButtonMouseUp(this,screenX, screenY, mask); + LLBottomTray::getInstance()->onDraggableButtonMouseUp(this, screenX, screenY); LLButton::handleMouseUp(x, y, mask); return FALSE; } @@ -86,7 +86,7 @@ BOOL LLBottomtrayButton::handleMouseDown(S32 x, S32 y, MASK mask) S32 screenX, screenY; localPointToScreen(x, y, &screenX, &screenY); // pass mouse up to bottomtray - LLBottomTray::getInstance()->onDraggableButtonMouseDown(this,screenX, screenY, mask); + LLBottomTray::getInstance()->onDraggableButtonMouseDown(this, screenX, screenY); LLButton::handleMouseDown(x, y, mask); return FALSE; } @@ -561,7 +561,7 @@ BOOL LLBottomTray::postBuild() //Drag-n-drop -void LLBottomTray::onDraggableButtonMouseDown(LLUICtrl* ctrl, S32 x, S32 y, MASK mask) +void LLBottomTray::onDraggableButtonMouseDown(LLUICtrl* ctrl, S32 x, S32 y) { if (ctrl == NULL) return; LLView* parent_view = ctrl->getParent(); @@ -607,7 +607,7 @@ LLPanel* LLBottomTray::findChildPanelByLocalCoords(S32 x, S32 y) return ctrl; } -void LLBottomTray::onDraggableButtonHover(S32 x, S32 y, MASK mask) +void LLBottomTray::onDraggableButtonHover(S32 x, S32 y) { // if mouse down on draggable item was done, check whether we should start DnD if (mCheckForDrag) @@ -765,7 +765,7 @@ void LLBottomTray::loadButtonsOrder() mToolbarStack->movePanel(mNearbyChatBar, NULL, true); } -void LLBottomTray::onDraggableButtonMouseUp(LLUICtrl* ctrl, S32 x, S32 y, MASK mask) +void LLBottomTray::onDraggableButtonMouseUp(LLUICtrl* ctrl, S32 x, S32 y) { //if mouse up happened over area where drop is possible, change order of buttons if (mLandingTab != NULL && mDraggedItem != NULL && mDragStarted) -- cgit v1.2.3 From baeded61a7cc281062efdecea2c8a385c619fe74 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Mon, 13 Sep 2010 20:06:48 +0300 Subject: STORM-101 FIXED Moved floater settings (rect, visibility, docked state) to account-specific XML file. The settings are now stored to settings_per_account.xml. This change affects all floaters having save_rect/save_visibility/save_dock_state params set to "true", not just detached sidebar tabs as the ticket requests. --- indra/newview/llbottomtray.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llbottomtray.cpp') diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index f3ade83d00..3f41424818 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -1526,7 +1526,7 @@ void LLBottomTray::setButtonsControlsAndListeners() // set control name for Build button. It is not enough to link it with Button.SetFloaterToggle in xml std::string vis_control_name = LLFloaterReg::declareVisibilityControl("build"); // Set the button control value (toggle state) to the floater visibility control (Sets the value as well) - build_btn->setControlVariable(LLUI::sSettingGroups["floater"]->getControl(vis_control_name)); + build_btn->setControlVariable(LLFloater::getControlGroup()->getControl(vis_control_name)); } bool LLBottomTray::toggleShowButton(LLBottomTray::EResizeState button_type, const LLSD& new_visibility) -- cgit v1.2.3