From cc22efa4c0d6b06bac6f49b6243df7726f89c7c4 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Wed, 3 Dec 2014 06:35:46 -0500 Subject: STORM-2082 Remove Apply button. Add new control variable to track which preset is active. Save settings to active preset when clicking on Ok button. Initial work to make pulldown operational. Still to do: add pretty icon for current preset. Notifications do not appear when called from this panel. --- indra/newview/llstatusbar.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'indra/newview/llstatusbar.cpp') diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 3c8dcaf4d4..7ca38fad03 100755 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -476,15 +476,17 @@ void LLStatusBar::onClickBuyCurrency() void LLStatusBar::onMouseEnterPresets() { + LLView* popup_holder = gViewerWindow->getRootView()->getChildView("popup_holder"); LLIconCtrl* icon = getChild( "presets_icon" ); - LLRect btn_rect = icon->getRect(); + LLRect icon_rect = icon->getRect(); LLRect pulldown_rect = mPanelPresetsPulldown->getRect(); - pulldown_rect.setLeftTopAndSize(btn_rect.mLeft - - (pulldown_rect.getWidth() - btn_rect.getWidth()), - btn_rect.mBottom, + pulldown_rect.setLeftTopAndSize(icon_rect.mLeft - + (pulldown_rect.getWidth() - icon_rect.getWidth()), + icon_rect.mBottom, pulldown_rect.getWidth(), pulldown_rect.getHeight()); + pulldown_rect.translate(popup_holder->getRect().getWidth() - pulldown_rect.mRight, 0); mPanelPresetsPulldown->setShape(pulldown_rect); // show the master presets pull-down @@ -497,6 +499,7 @@ void LLStatusBar::onMouseEnterPresets() void LLStatusBar::onMouseEnterVolume() { + LLView* popup_holder = gViewerWindow->getRootView()->getChildView("popup_holder"); LLButton* volbtn = getChild( "volume_btn" ); LLRect vol_btn_rect = volbtn->getRect(); LLRect volume_pulldown_rect = mPanelVolumePulldown->getRect(); @@ -506,6 +509,7 @@ void LLStatusBar::onMouseEnterVolume() volume_pulldown_rect.getWidth(), volume_pulldown_rect.getHeight()); + volume_pulldown_rect.translate(popup_holder->getRect().getWidth() - volume_pulldown_rect.mRight, 0); mPanelVolumePulldown->setShape(volume_pulldown_rect); -- cgit v1.2.3