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.
meow-7.2.2
Seth ProductEngine 2010-12-08 23:43:25 +02:00
parent 39e4303653
commit c8d1cf82eb
3 changed files with 17 additions and 3 deletions

View File

@ -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<LLTabContainer>("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<LLColorSwatchCtrl>("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"));

View File

@ -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.

View File

@ -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):
</text>
<color_swatch
can_apply_immediately="true"
@ -290,7 +290,7 @@
left_delta="10"
top_pad="5"
name="background"
tool_tip="Choose color for bubble chat"
tool_tip="Choose name tag color"
width="44">
<color_swatch.init_callback
function="Pref.getUIColor"
@ -310,6 +310,7 @@
left_pad="10"
label_width="70"
name="bubble_chat_opacity"
tool_tip="Choose name tag opacity"
top_delta = "6"
width="378" />
<text