Merge
commit
77f795cae5
|
|
@ -41,6 +41,7 @@
|
|||
// Store these in pre-built std::strings to avoid memory allocations in
|
||||
// LLSD map lookups
|
||||
static const std::string SL_ID("sl_id");
|
||||
static const std::string USERNAME("username");
|
||||
static const std::string DISPLAY_NAME("display_name");
|
||||
static const std::string LEGACY_FIRST_NAME("legacy_first_name");
|
||||
static const std::string LEGACY_LAST_NAME("legacy_last_name");
|
||||
|
|
@ -68,9 +69,7 @@ bool LLAvatarName::operator<(const LLAvatarName& rhs) const
|
|||
LLSD LLAvatarName::asLLSD() const
|
||||
{
|
||||
LLSD sd;
|
||||
// Due to a late-breaking change request from Product, we renamed
|
||||
// "SLID" to "Username", but it was too late to change the wire format.
|
||||
sd[SL_ID] = mUsername;
|
||||
sd[USERNAME] = mUsername;
|
||||
sd[DISPLAY_NAME] = mDisplayName;
|
||||
sd[LEGACY_FIRST_NAME] = mLegacyFirstName;
|
||||
sd[LEGACY_LAST_NAME] = mLegacyLastName;
|
||||
|
|
@ -81,7 +80,17 @@ LLSD LLAvatarName::asLLSD() const
|
|||
|
||||
void LLAvatarName::fromLLSD(const LLSD& sd)
|
||||
{
|
||||
mUsername = sd[SL_ID].asString(); // see asLLSD() above
|
||||
// *HACK: accept both wire formats for now, as we are transitioning
|
||||
// People API to use "username"
|
||||
if (sd.has(USERNAME))
|
||||
{
|
||||
mUsername = sd[USERNAME].asString();
|
||||
}
|
||||
else
|
||||
{
|
||||
// *TODO: Remove
|
||||
mUsername = sd[SL_ID].asString();
|
||||
}
|
||||
mDisplayName = sd[DISPLAY_NAME].asString();
|
||||
mLegacyFirstName = sd[LEGACY_FIRST_NAME].asString();
|
||||
mLegacyLastName = sd[LEGACY_LAST_NAME].asString();
|
||||
|
|
|
|||
|
|
@ -327,6 +327,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
|
|||
sSkin = gSavedSettings.getString("SkinCurrent");
|
||||
|
||||
gSavedSettings.getControl("NameTagShowUsernames")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2));
|
||||
gSavedSettings.getControl("NameTagShowFriends")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2));
|
||||
gSavedSettings.getControl("UseDisplayNames")->getCommitSignal()->connect(boost::bind(&handleDisplayNamesOptionChanged, _2));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ const F32 SPRING_STRENGTH = 0.7f;
|
|||
const F32 RESTORATION_SPRING_TIME_CONSTANT = 0.1f;
|
||||
const F32 HORIZONTAL_PADDING = 16.f;
|
||||
const F32 VERTICAL_PADDING = 12.f;
|
||||
const F32 LINE_PADDING = 1; // aka "leading"
|
||||
const F32 LINE_PADDING = 3.f; // aka "leading"
|
||||
const F32 BUFFER_SIZE = 2.f;
|
||||
const F32 MIN_EDGE_OVERLAP = 3.f;
|
||||
const F32 HUD_TEXT_MAX_WIDTH = 190.f;
|
||||
|
|
@ -460,7 +460,7 @@ void LLHUDNameTag::renderText(BOOL for_select)
|
|||
LLUI::popMatrix();
|
||||
}
|
||||
|
||||
F32 y_offset = (F32)mOffsetY - 2; // JAMESDEBUG
|
||||
F32 y_offset = (F32)mOffsetY;
|
||||
|
||||
// Render label
|
||||
{
|
||||
|
|
@ -807,6 +807,12 @@ void LLHUDNameTag::updateSize()
|
|||
++iter;
|
||||
}
|
||||
|
||||
// Don't want line spacing under the last line
|
||||
if (height > 0.f)
|
||||
{
|
||||
height -= LINE_PADDING;
|
||||
}
|
||||
|
||||
iter = mLabelSegments.begin();
|
||||
while (iter != mLabelSegments.end())
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue