From af827615acc6cce0457ba00810136c41283f6158 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Fri, 28 Nov 2014 10:00:41 -0500 Subject: STORM-2082 Initial support for presets popup from status bar --- indra/newview/llstatusbar.cpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'indra/newview/llstatusbar.cpp') diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index eedb829b48..3c8dcaf4d4 100755 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -38,6 +38,7 @@ #include "llfloaterbuycurrency.h" #include "llbuycurrencyhtml.h" #include "llpanelnearbymedia.h" +#include "llpanelpresetspulldown.h" #include "llpanelvolumepulldown.h" #include "llfloaterregioninfo.h" #include "llfloaterscriptdebug.h" @@ -175,6 +176,9 @@ BOOL LLStatusBar::postBuild() mBtnStats = getChildView("stat_btn"); + mIconPresets = getChild( "presets_icon" ); + mIconPresets->setMouseEnterCallback(boost::bind(&LLStatusBar::onMouseEnterPresets, this)); + mBtnVolume = getChild( "volume_btn" ); mBtnVolume->setClickedCallback( onClickVolume, this ); mBtnVolume->setMouseEnterCallback(boost::bind(&LLStatusBar::onMouseEnterVolume, this)); @@ -228,6 +232,11 @@ BOOL LLStatusBar::postBuild() mSGPacketLoss = LLUICtrlFactory::create(pgp); addChild(mSGPacketLoss); + mPanelPresetsPulldown = new LLPanelPresetsPulldown(); + addChild(mPanelPresetsPulldown); + mPanelPresetsPulldown->setFollows(FOLLOWS_TOP|FOLLOWS_RIGHT); + mPanelPresetsPulldown->setVisible(FALSE); + mPanelVolumePulldown = new LLPanelVolumePulldown(); addChild(mPanelVolumePulldown); mPanelVolumePulldown->setFollows(FOLLOWS_TOP|FOLLOWS_RIGHT); @@ -465,6 +474,27 @@ void LLStatusBar::onClickBuyCurrency() LLFirstUse::receiveLindens(false); } +void LLStatusBar::onMouseEnterPresets() +{ + LLIconCtrl* icon = getChild( "presets_icon" ); + LLRect btn_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.getWidth(), + pulldown_rect.getHeight()); + + mPanelPresetsPulldown->setShape(pulldown_rect); + + // show the master presets pull-down + LLUI::clearPopups(); + LLUI::addPopup(mPanelPresetsPulldown); + mPanelNearByMedia->setVisible(FALSE); + mPanelVolumePulldown->setVisible(FALSE); + mPanelPresetsPulldown->setVisible(TRUE); +} + void LLStatusBar::onMouseEnterVolume() { LLButton* volbtn = getChild( "volume_btn" ); @@ -482,6 +512,7 @@ void LLStatusBar::onMouseEnterVolume() // show the master volume pull-down LLUI::clearPopups(); LLUI::addPopup(mPanelVolumePulldown); + mPanelPresetsPulldown->setVisible(FALSE); mPanelNearByMedia->setVisible(FALSE); mPanelVolumePulldown->setVisible(TRUE); } @@ -505,6 +536,7 @@ void LLStatusBar::onMouseEnterNearbyMedia() LLUI::clearPopups(); LLUI::addPopup(mPanelNearByMedia); + mPanelPresetsPulldown->setVisible(FALSE); mPanelVolumePulldown->setVisible(FALSE); mPanelNearByMedia->setVisible(TRUE); } -- cgit v1.2.3 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 From c8726aba303bcf1207b730a344536e25491420bc Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Tue, 10 Nov 2015 09:48:56 -0500 Subject: remove execute permission from many files that should not have it --- indra/newview/llstatusbar.cpp | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 indra/newview/llstatusbar.cpp (limited to 'indra/newview/llstatusbar.cpp') diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp old mode 100755 new mode 100644 -- cgit v1.2.3 From 4ecf35abb6362bb899adf0f661e71575e5f83438 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Wed, 11 Nov 2015 00:58:27 +0200 Subject: MAINT-5750 Graphics quick change icon and notices appear in mouselook --- indra/newview/llstatusbar.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llstatusbar.cpp') diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 5c1041e556..6d5adc3a43 100755 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -325,6 +325,7 @@ void LLStatusBar::setVisibleForMouselook(bool visible) mSGBandwidth->setVisible(visible); mSGPacketLoss->setVisible(visible); setBackgroundVisible(visible); + mIconPresets->setVisible(visible); } void LLStatusBar::debitBalance(S32 debit) -- cgit v1.2.3