diff options
author | richard <none@none> | 2010-01-11 14:41:37 -0800 |
---|---|---|
committer | richard <none@none> | 2010-01-11 14:41:37 -0800 |
commit | 3e5f5a205034cde29ef80a9230d8cd4867e6dec5 (patch) | |
tree | 36bb18767f3ac5e16fa98a7e8c2b973625645d0c /indra/newview/llstatusbar.cpp | |
parent | daa4965fe053dbd1af1f9665b29a4a10ac31cfea (diff) |
EXT-3444 Volume control slider appears in an odd location
reviewed by Leyla
Diffstat (limited to 'indra/newview/llstatusbar.cpp')
-rw-r--r-- | indra/newview/llstatusbar.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 5ce3bbb9f6..b3b2b9ee5d 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -42,7 +42,7 @@ #include "llfloaterbuycurrency.h" #include "llfloaterchat.h" #include "llfloaterlagmeter.h" -#include "llfloatervolumepulldown.h" +#include "llpanelvolumepulldown.h" #include "llfloaterregioninfo.h" #include "llfloaterscriptdebug.h" #include "llhudicon.h" @@ -204,6 +204,21 @@ LLStatusBar::LLStatusBar(const LLRect& rect) addChild(mSGPacketLoss); childSetActionTextbox("stat_btn", onClickStatGraph); + + mPanelVolumePulldown = new LLPanelVolumePulldown(); + addChild(mPanelVolumePulldown); + + LLRect volume_pulldown_rect = mPanelVolumePulldown->getRect(); + LLButton* volbtn = getChild<LLButton>( "volume_btn" ); + volume_pulldown_rect.setLeftTopAndSize(volbtn->getRect().mLeft - + (volume_pulldown_rect.getWidth() - volbtn->getRect().getWidth())/2, + volbtn->calcScreenRect().mBottom, + volume_pulldown_rect.getWidth(), + volume_pulldown_rect.getHeight()); + + mPanelVolumePulldown->setShape(volume_pulldown_rect); + mPanelVolumePulldown->setFollows(FOLLOWS_TOP|FOLLOWS_RIGHT); + mPanelVolumePulldown->setVisible(FALSE); } LLStatusBar::~LLStatusBar() @@ -501,7 +516,7 @@ static void onClickScriptDebug(void*) void LLStatusBar::onMouseEnterVolume(LLUICtrl* ctrl) { // show the master volume pull-down - LLFloaterReg::showInstance("volume_pulldown"); + gStatusBar->mPanelVolumePulldown->setVisible(TRUE); } static void onClickVolume(void* data) |