From c8d1cf82eb89d46e40bf1dd28ef2a1597273f921 Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Wed, 8 Dec 2010 23:43:25 +0200 Subject: STORM-584 ADDITIONAL FIX When the user sets the opacity for the name tag the selected opacity is shown in the color swatch to the left. Fixed color swatch label and tooltip. Added toolltip to opacity slider. --- indra/newview/llfloaterpreference.cpp | 12 ++++++++++++ indra/newview/llfloaterpreference.h | 1 + .../skins/default/xui/en/panel_preferences_colors.xml | 7 ++++--- 3 files changed, 17 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 6a7b5171b5..338b6555ff 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -342,6 +342,8 @@ BOOL LLFloaterPreference::postBuild() gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&LLNearbyChat::processChatHistoryStyleUpdate, _2)); + gSavedSettings.getControl("ChatBubbleOpacity")->getSignal()->connect(boost::bind(&LLFloaterPreference::onNameTagOpacityChange, this, _2)); + LLTabContainer* tabcontainer = getChild("pref core"); if (!tabcontainer->selectTab(gSavedSettings.getS32("LastPrefTab"))) tabcontainer->selectFirstTab(); @@ -745,6 +747,16 @@ void LLFloaterPreference::onLanguageChange() } } +void LLFloaterPreference::onNameTagOpacityChange(const LLSD& newvalue) +{ + LLColorSwatchCtrl* color_swatch = findChild("background"); + if (color_swatch) + { + LLColor4 new_color = color_swatch->get(); + color_swatch->set( new_color.setAlpha(newvalue.asReal()) ); + } +} + void LLFloaterPreference::onClickSetCache() { std::string cur_name(gSavedSettings.getString("CacheLocation")); diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index bb871e7e25..0f51189853 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -84,6 +84,7 @@ protected: void onClickBrowserClearCache(); void onLanguageChange(); + void onNameTagOpacityChange(const LLSD& newvalue); // set value of "BusyResponseChanged" in account settings depending on whether busy response // string differs from default after user changes. diff --git a/indra/newview/skins/default/xui/en/panel_preferences_colors.xml b/indra/newview/skins/default/xui/en/panel_preferences_colors.xml index 5797a63f4e..8a37822413 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_colors.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_colors.xml @@ -275,9 +275,9 @@ height="12" name="bubble_chat" top_pad="20" - width="140" + width="450" > - Bubble chat background: + Name tag background color (also affects Bubble Chat):