diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 036bb2b6a4..dae7f52450 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -19009,5 +19009,17 @@ Change of this parameter will affect the layout of buttons in notification toast Value 0 + + FSEnableVolumeControls + + Comment + If true, Firestorm will show volume controls (sounds, media, stream) in upper right corner of the screen. Useful, if skin already has its own controls. + Persist + 1 + Type + Boolean + Value + 1 + diff --git a/indra/newview/app_settings/settings_phoenix.xml b/indra/newview/app_settings/settings_phoenix.xml index 7dfbd9fed2..959d48d09f 100644 --- a/indra/newview/app_settings/settings_phoenix.xml +++ b/indra/newview/app_settings/settings_phoenix.xml @@ -395,5 +395,17 @@ 1 + FSEnableVolumeControls + + Comment + If true, Firestorm will show volume controls (sounds, media, stream) in upper right corner of the screen. Useful, if skin already has its own controls. + Persist + 1 + Type + Boolean + Value + 0 + + diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 134619c85c..50614b1be2 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -204,6 +204,9 @@ LLStatusBar::LLStatusBar(const LLRect& rect) gSavedSettings.getControl("ShowNetStats")->getSignal()->connect(boost::bind(&LLStatusBar::updateNetstatVisibility, this, _2)); + // Option to hide volume controls (sounds, media, stream) in upper right + gSavedSettings.getControl("FSEnableVolumeControls")->getSignal()->connect(boost::bind(&LLStatusBar::updateVolumeControlsVisibility, this, _2)); + buildFromFile("panel_status_bar.xml"); } @@ -409,6 +412,14 @@ BOOL LLStatusBar::postBuild() updateNetstatVisibility(LLSD(FALSE)); } + // Option to hide volume controls (sounds, media, stream) in upper right + mVolumeIconsWidth = mBtnVolume->getRect().getWidth() + mStreamToggle->getRect().getWidth() + mMediaToggle->getRect().getWidth(); + if (!gSavedSettings.getBOOL("FSEnableVolumeControls")) + { + updateVolumeControlsVisibility(LLSD(FALSE)); + } + // + return TRUE; } @@ -571,9 +582,15 @@ void LLStatusBar::setVisibleForMouselook(bool visible) mTextTime->setVisible(visible); mBalancePanel->setVisible(visible); mBoxBalance->setVisible(visible); - mBtnVolume->setVisible(visible); - mStreamToggle->setVisible(visible); // ## Zi: Media/Stream separation - mMediaToggle->setVisible(visible); + // Option to hide volume controls (sounds, media, stream) in upper right + // mBtnVolume->setVisible(visible); + // mStreamToggle->setVisible(visible); // ## Zi: Media/Stream separation + // mMediaToggle->setVisible(visible); + BOOL FSEnableVolumeControls = gSavedSettings.getBOOL("FSEnableVolumeControls"); + mBtnVolume->setVisible(visible && FSEnableVolumeControls); + mStreamToggle->setVisible(visible && FSEnableVolumeControls); // ## Zi: Media/Stream separation + mMediaToggle->setVisible(visible && FSEnableVolumeControls); + // BOOL showNetStats = gSavedSettings.getBOOL("ShowNetStats"); mSGBandwidth->setVisible(visible && showNetStats); mSGPacketLoss->setVisible(visible && showNetStats); @@ -1357,6 +1374,27 @@ void LLStatusBar::updateNetstatVisibility(const LLSD& data) mBalancePanel->setRect(rect); } +// Option to hide volume controls (sounds, media, stream) in upper right +void LLStatusBar::updateVolumeControlsVisibility(const LLSD& data) +{ + const S32 cVolumeIconsWidth = mVolumeIconsWidth; + BOOL showVolumeControls = data.asBoolean(); + S32 translateFactor = (showVolumeControls ? -1 : 1); + + mBtnVolume->setVisible(showVolumeControls); + mStreamToggle->setVisible(showVolumeControls); + mMediaToggle->setVisible(showVolumeControls); + + LLRect rect = mTimeMediaPanel->getRect(); + rect.translate(cVolumeIconsWidth * translateFactor, 0); + mTimeMediaPanel->setRect(rect); + + rect = mBalancePanel->getRect(); + rect.translate(cVolumeIconsWidth * translateFactor, 0); + mBalancePanel->setRect(rect); +} +// + // Pathfinding rebake functions BOOL LLStatusBar::rebakeRegionCallback(const LLSD& notification,const LLSD& response) { diff --git a/indra/newview/llstatusbar.h b/indra/newview/llstatusbar.h index 2c8f4de715..18fd3f42ff 100644 --- a/indra/newview/llstatusbar.h +++ b/indra/newview/llstatusbar.h @@ -295,6 +295,7 @@ private: void setParcelInfoText(const std::string& new_text); void updateNetstatVisibility(const LLSD& data); + void updateVolumeControlsVisibility(const LLSD& data); // Option to hide volume controls (sounds, media, stream) in upper right private: LLTextBox *mTextBalance; @@ -315,6 +316,7 @@ private: LLView *mScriptOut; LLFrameTimer mClockUpdateTimer; + S32 mVolumeIconsWidth; // Option to hide volume controls (sounds, media, stream) in upper right S32 mBalance; S32 mHealth; S32 mSquareMetersCredit; diff --git a/indra/newview/skins/default/xui/de/panel_preferences_UI.xml b/indra/newview/skins/default/xui/de/panel_preferences_UI.xml index 17d1341763..1ef0411f83 100644 --- a/indra/newview/skins/default/xui/de/panel_preferences_UI.xml +++ b/indra/newview/skins/default/xui/de/panel_preferences_UI.xml @@ -31,7 +31,8 @@ - + + diff --git a/indra/newview/skins/default/xui/en/panel_preferences_UI.xml b/indra/newview/skins/default/xui/en/panel_preferences_UI.xml index f8003063dd..024f3a586d 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_UI.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_UI.xml @@ -248,9 +248,18 @@ name="ShowNetStats" label="Show lag meter" left="5" - width="270" + width="110" tool_tip="Show lag meter in the Status Overlay"/> + + - + + diff --git a/indra/newview/skins/default/xui/it/panel_preferences_UI.xml b/indra/newview/skins/default/xui/it/panel_preferences_UI.xml index 2444eda164..d07c859398 100644 --- a/indra/newview/skins/default/xui/it/panel_preferences_UI.xml +++ b/indra/newview/skins/default/xui/it/panel_preferences_UI.xml @@ -29,7 +29,7 @@ - + Quanti menu Script per oggetto: diff --git a/indra/newview/skins/default/xui/pl/panel_preferences_UI.xml b/indra/newview/skins/default/xui/pl/panel_preferences_UI.xml index 617d3689d9..6ca2c7a2a4 100644 --- a/indra/newview/skins/default/xui/pl/panel_preferences_UI.xml +++ b/indra/newview/skins/default/xui/pl/panel_preferences_UI.xml @@ -29,7 +29,8 @@ - + + diff --git a/indra/newview/skins/starlight/xui/en/panel_status_bar.xml b/indra/newview/skins/starlight/xui/en/panel_status_bar.xml index 7eb0de739f..2bae17626b 100644 --- a/indra/newview/skins/starlight/xui/en/panel_status_bar.xml +++ b/indra/newview/skins/starlight/xui/en/panel_status_bar.xml @@ -252,23 +252,25 @@ top="2" width="40" /> - - + background_visible="true" + bg_opaque_color="MouseGray"> + + - - + diff --git a/indra/newview/skins/starlight/xui/pl/panel_status_bar.xml b/indra/newview/skins/starlight/xui/pl/panel_status_bar.xml index 18c4305194..d80f8f24fa 100644 --- a/indra/newview/skins/starlight/xui/pl/panel_status_bar.xml +++ b/indra/newview/skins/starlight/xui/pl/panel_status_bar.xml @@ -21,11 +21,9 @@