Refactor legacy friendlist and move out font name into the XML for per-skin customization

Ansariel 2014-05-16 12:08:00 +02:00
parent 39a6670935
commit 944ffe50ee
7 changed files with 9 additions and 1 deletions

View File

@ -113,6 +113,7 @@ BOOL FSFloaterContacts::postBuild()
{
mTabContainer = getChild<LLTabContainer>("friends_and_groups");
mFriendsTab = getChild<LLPanel>(FRIENDS_TAB_NAME);
mFriendListFontName = mFriendsTab->getString("FontName");
mFriendsList = mFriendsTab->getChild<LLScrollListCtrl>("friend_list");
mFriendsList->setMaxSelectable(MAX_FRIEND_SELECT);
@ -584,7 +585,7 @@ void FSFloaterContacts::addFriend(const LLUUID& agent_id)
LLSD& friend_column = element["columns"][LIST_FRIEND_NAME];
friend_column["column"] = "full_name";
friend_column["value"] = av_name.getCompleteName();
friend_column["font"]["name"] = "SANSSERIF";
friend_column["font"]["name"] = mFriendListFontName;
friend_column["font"]["style"] = "NORMAL";
LLSD& online_status_column = element["columns"][LIST_ONLINE_STATUS];

View File

@ -140,6 +140,8 @@ private:
BOOL mAllowRightsChange;
S32 mNumRightsChanged;
LLCachedControl<bool> mSortByUserName;
std::string mFriendListFontName;
};

View File

@ -5,6 +5,7 @@
mouse_opaque="true"
name="friends"
width="355">
<panel.string name="FontName" value="SANSSERIF"/>
<panel.string name="FriendCount" value="Friends: [COUNT]"/>
<!--
<view_border

View File

@ -5,6 +5,7 @@
mouse_opaque="true"
name="friends"
width="355">
<panel.string name="FontName" value="SANSSERIF"/>
<panel.string name="FriendCount" value="Friends: [COUNT]"/>
<!--
<view_border

View File

@ -5,6 +5,7 @@
mouse_opaque="true"
name="friends"
width="355">
<panel.string name="FontName" value="SANSSERIF"/>
<panel.string name="FriendCount" value="Friends: [COUNT]"/>
<!--
<view_border

View File

@ -5,6 +5,7 @@
mouse_opaque="true"
name="friends"
width="355">
<panel.string name="FontName" value="SANSSERIF"/>
<panel.string name="FriendCount" value="Friends: [COUNT]"/>
<!--
<view_border

View File

@ -5,6 +5,7 @@
mouse_opaque="true"
name="friends"
width="355">
<panel.string name="FontName" value="SANSSERIF"/>
<panel.string name="FriendCount" value="Friends: [COUNT]"/>
<view_border
top="1"