From 5d8de7b7200c514bb874e4f60581c6df6cf3be5a Mon Sep 17 00:00:00 2001 From: Erica Date: Thu, 21 Jan 2010 10:52:58 -0800 Subject: getting chiclet stuff out of test floater since it causes a crash --- .../skins/default/xui/en/floater_test_checkbox.xml | 79 ---------------------- 1 file changed, 79 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_test_checkbox.xml b/indra/newview/skins/default/xui/en/floater_test_checkbox.xml index 042b4226c3..9977e85a9d 100644 --- a/indra/newview/skins/default/xui/en/floater_test_checkbox.xml +++ b/indra/newview/skins/default/xui/en/floater_test_checkbox.xml @@ -71,83 +71,4 @@ name="font_checkbox" top_pad="14" width="150" /> - - - - - - - - - - - - - - - -- cgit v1.2.3 From 337716d946cf4ece8ba59cce82bd51b3c2148f75 Mon Sep 17 00:00:00 2001 From: richard Date: Fri, 22 Jan 2010 16:51:13 -0800 Subject: LLPointer cleanup and fix for EXT-4413 reviewed by Rick --- indra/newview/llavatarlist.h | 10 +-- indra/newview/llavatarlistitem.cpp | 88 +++++++++------------- indra/newview/llavatarlistitem.h | 15 +++- indra/newview/llexpandabletextbox.cpp | 6 +- indra/newview/llviewertexteditor.cpp | 2 +- .../default/xui/en/widgets/avatar_list_item.xml | 44 +++++++++++ 6 files changed, 98 insertions(+), 67 deletions(-) create mode 100644 indra/newview/skins/default/xui/en/widgets/avatar_list_item.xml (limited to 'indra/newview') diff --git a/indra/newview/llavatarlist.h b/indra/newview/llavatarlist.h index a58a562378..aeed4fee08 100644 --- a/indra/newview/llavatarlist.h +++ b/indra/newview/llavatarlist.h @@ -57,11 +57,11 @@ public: struct Params : public LLInitParam::Block { - Optional ignore_online_status; // show all items as online - Optional show_last_interaction_time; // show most recent interaction time. *HACK: move this to a derived class - Optional show_info_btn; - Optional show_profile_btn; - Optional show_speaking_indicator; + Optional ignore_online_status, // show all items as online + show_last_interaction_time, // show most recent interaction time. *HACK: move this to a derived class + show_info_btn, + show_profile_btn, + show_speaking_indicator; Params(); }; diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index 66ab32f3e8..26a39532dd 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -48,6 +48,17 @@ S32 LLAvatarListItem::sLeftPadding = 0; S32 LLAvatarListItem::sRightNamePadding = 0; S32 LLAvatarListItem::sChildrenWidths[LLAvatarListItem::ALIC_COUNT]; +static LLWidgetNameRegistry::StaticRegistrar sRegisterAvatarListItemParams(&typeid(LLAvatarListItem::Params), "avatar_list_item"); + +LLAvatarListItem::Params::Params() +: default_style("default_style"), + voice_call_invited_style("voice_call_invited_style"), + voice_call_joined_style("voice_call_joined_style"), + voice_call_left_style("voice_call_left_style"), + online_style("online_style"), + offline_style("offline_style") +{}; + LLAvatarListItem::LLAvatarListItem(bool not_from_ui_factory/* = true*/) : LLPanel(), @@ -166,9 +177,30 @@ void LLAvatarListItem::setHighlight(const std::string& highlight) void LLAvatarListItem::setState(EItemState item_style) { - item_style_map_t& item_styles_params_map = getItemStylesParams(); + const LLAvatarListItem::Params& params = LLUICtrlFactory::getDefaultParams(); - mAvatarNameStyle = item_styles_params_map[item_style]; + switch(item_style) + { + default: + case IS_DEFAULT: + mAvatarNameStyle = params.default_style(); + break; + case IS_VOICE_INVITED: + mAvatarNameStyle = params.voice_call_invited_style(); + break; + case IS_VOICE_JOINED: + mAvatarNameStyle = params.voice_call_joined_style(); + break; + case IS_VOICE_LEFT: + mAvatarNameStyle = params.voice_call_left_style(); + break; + case IS_ONLINE: + mAvatarNameStyle = params.online_style(); + break; + case IS_OFFLINE: + mAvatarNameStyle = params.offline_style(); + break; + } // *NOTE: You cannot set the style on a text box anymore, you must // rebuild the text. This will cause problems if the text contains @@ -352,58 +384,6 @@ std::string LLAvatarListItem::formatSeconds(U32 secs) return getString(fmt, args); } -// static -LLAvatarListItem::item_style_map_t& LLAvatarListItem::getItemStylesParams() -{ - static item_style_map_t item_styles_params_map; - if (!item_styles_params_map.empty()) return item_styles_params_map; - - LLPanel::Params params = LLUICtrlFactory::getDefaultParams(); - LLPanel* params_panel = LLUICtrlFactory::create(params); - - BOOL sucsess = LLUICtrlFactory::instance().buildPanel(params_panel, "panel_avatar_list_item_params.xml"); - - if (sucsess) - { - - item_styles_params_map.insert( - std::make_pair(IS_DEFAULT, - params_panel->getChild("default_style")->getDefaultStyle())); - - item_styles_params_map.insert( - std::make_pair(IS_VOICE_INVITED, - params_panel->getChild("voice_call_invited_style")->getDefaultStyle())); - - item_styles_params_map.insert( - std::make_pair(IS_VOICE_JOINED, - params_panel->getChild("voice_call_joined_style")->getDefaultStyle())); - - item_styles_params_map.insert( - std::make_pair(IS_VOICE_LEFT, - params_panel->getChild("voice_call_left_style")->getDefaultStyle())); - - item_styles_params_map.insert( - std::make_pair(IS_ONLINE, - params_panel->getChild("online_style")->getDefaultStyle())); - - item_styles_params_map.insert( - std::make_pair(IS_OFFLINE, - params_panel->getChild("offline_style")->getDefaultStyle())); - } - else - { - item_styles_params_map.insert(std::make_pair(IS_DEFAULT, LLStyle::Params())); - item_styles_params_map.insert(std::make_pair(IS_VOICE_INVITED, LLStyle::Params())); - item_styles_params_map.insert(std::make_pair(IS_VOICE_JOINED, LLStyle::Params())); - item_styles_params_map.insert(std::make_pair(IS_VOICE_LEFT, LLStyle::Params())); - item_styles_params_map.insert(std::make_pair(IS_ONLINE, LLStyle::Params())); - item_styles_params_map.insert(std::make_pair(IS_OFFLINE, LLStyle::Params())); - } - if (params_panel) params_panel->die(); - - return item_styles_params_map; -} - // static LLAvatarListItem::icon_color_map_t& LLAvatarListItem::getItemIconColorMap() { diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h index 479a4833cb..9f81aa0804 100644 --- a/indra/newview/llavatarlistitem.h +++ b/indra/newview/llavatarlistitem.h @@ -46,6 +46,18 @@ class LLAvatarIconCtrl; class LLAvatarListItem : public LLPanel, public LLFriendObserver { public: + struct Params : public LLInitParam::Block + { + Optional default_style, + voice_call_invited_style, + voice_call_joined_style, + voice_call_left_style, + online_style, + offline_style; + + Params(); + }; + typedef enum e_item_state_type { IS_DEFAULT, IS_VOICE_INVITED, @@ -143,9 +155,6 @@ private: std::string formatSeconds(U32 secs); - typedef std::map item_style_map_t; - static item_style_map_t& getItemStylesParams(); - typedef std::map icon_color_map_t; static icon_color_map_t& getItemIconColorMap(); diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp index 9f6412c0ab..77b3a48cef 100644 --- a/indra/newview/llexpandabletextbox.cpp +++ b/indra/newview/llexpandabletextbox.cpp @@ -169,8 +169,7 @@ void LLExpandableTextBox::LLTextBoxEx::showExpandText() std::pair visible_lines = getVisibleLines(true); S32 last_line = visible_lines.second - 1; - LLStyle::Params expander_style = getDefaultStyle(); - expander_style.font.name(LLFontGL::nameFromFont(expander_style.font)); + LLStyle::Params expander_style(getDefaultStyleParams()); expander_style.font.style = "UNDERLINE"; expander_style.color = LLUIColorTable::instance().getColor("HTMLLinkColor"); LLExpanderSegment* expanderp = new LLExpanderSegment(new LLStyle(expander_style), getLineStart(last_line), getLength() + 1, mExpanderLabel, *this); @@ -186,8 +185,7 @@ void LLExpandableTextBox::LLTextBoxEx::hideExpandText() if (mExpanderVisible) { // this will overwrite the expander segment and all text styling with a single style - LLNormalTextSegment* segmentp = new LLNormalTextSegment( - new LLStyle(getDefaultStyle()), 0, getLength() + 1, *this); + LLNormalTextSegment* segmentp = new LLNormalTextSegment(LLStyleConstSP(new LLStyle(getDefaultStyleParams())), 0, getLength() + 1, *this); insertSegment(segmentp); mExpanderVisible = false; diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index 300aea1620..94c257fe8c 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -247,7 +247,7 @@ public: return FALSE; } - /*virtual*/ const LLStyleSP getStyle() const { return mStyle; } + /*virtual*/ LLStyleConstSP getStyle() const { return mStyle; } private: LLUIImagePtr mImage; diff --git a/indra/newview/skins/default/xui/en/widgets/avatar_list_item.xml b/indra/newview/skins/default/xui/en/widgets/avatar_list_item.xml new file mode 100644 index 0000000000..1a9a882c7b --- /dev/null +++ b/indra/newview/skins/default/xui/en/widgets/avatar_list_item.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3 From 955c0cc5a9ab8fb9eda7a6c20cd7bd09c2fd9369 Mon Sep 17 00:00:00 2001 From: richard Date: Fri, 22 Jan 2010 17:17:12 -0800 Subject: wrong param names for avatar list item colors reviewed by Rick --- .../skins/default/xui/en/widgets/avatar_list_item.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/widgets/avatar_list_item.xml b/indra/newview/skins/default/xui/en/widgets/avatar_list_item.xml index 1a9a882c7b..ed8df69bf4 100644 --- a/indra/newview/skins/default/xui/en/widgets/avatar_list_item.xml +++ b/indra/newview/skins/default/xui/en/widgets/avatar_list_item.xml @@ -10,35 +10,35 @@ + color="DkGray"/> + color="0.5 0.5 0.5 0.5"/> + color="white"/> + color="LtGray_50"/> + color="white"/> + color="0.5 0.5 0.5 1.0"/> -- cgit v1.2.3 From ae9449bff10d8c2247ae28044af50870c6a782eb Mon Sep 17 00:00:00 2001 From: Erica Date: Fri, 22 Jan 2010 23:04:59 -0800 Subject: Group profile layout now resizes with the viewer window. Gave extra room to each accordion panel, and tweaked the layout a bit. --- .../skins/default/xui/en/panel_group_general.xml | 87 +++++--- .../default/xui/en/panel_group_info_sidetray.xml | 163 ++++++++------ .../default/xui/en/panel_group_land_money.xml | 104 ++++----- .../skins/default/xui/en/panel_group_notices.xml | 82 +++---- .../skins/default/xui/en/panel_group_roles.xml | 247 ++++++++++++--------- .../skins/default/xui/en/panel_side_tray.xml | 2 +- 6 files changed, 395 insertions(+), 290 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_group_general.xml b/indra/newview/skins/default/xui/en/panel_group_general.xml index af73faf9a1..96185bad56 100644 --- a/indra/newview/skins/default/xui/en/panel_group_general.xml +++ b/indra/newview/skins/default/xui/en/panel_group_general.xml @@ -1,12 +1,11 @@ + name="general_tab"> The General tab contains general information about this group, a list of members, general Group Preferences and member options. @@ -25,12 +24,14 @@ Hover your mouse over the options for more help. type="string" follows="left|top|right" left="5" - height="60" + height="150" layout="topleft" max_length="511" name="charter" top="5" right="-1" + bg_readonly_color="DkGray2" + text_readonly_color="White" word_wrap="true"> Group Charter @@ -38,8 +39,8 @@ Hover your mouse over the options for more help. column_padding="0" draw_heading="true" follows="left|top|right" - heading_height="20" - height="156" + heading_height="23" + height="200" layout="topleft" left="0" right="-1" @@ -60,17 +61,29 @@ Hover your mouse over the options for more help. height="12" layout="left|top|right" left="5" + text_color="EmphasisColor" + name="my_group_settngs_label" + top_pad="10" + width="300"> + Me + + - My Title + My title: @@ -79,7 +92,7 @@ Hover your mouse over the options for more help. font="SansSerifSmall" label="Receive group notices" layout="topleft" - left="5" + left="10" name="receive_notices" tool_tip="Sets whether you want to receive Notices from this group. Uncheck this box if this group is spamming you." top_pad="5" @@ -88,36 +101,46 @@ Hover your mouse over the options for more help. height="16" label="Show in my profile" layout="topleft" - left="5" + left="10" name="list_groups_in_profile" tool_tip="Sets whether you want to show this group in your profile" top_pad="5" width="295" /> - + top_pad="5"> + + Group + - + + diff --git a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml index 673052c3b5..4e017819c1 100644 --- a/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml +++ b/indra/newview/skins/default/xui/en/panel_group_info_sidetray.xml @@ -2,17 +2,17 @@ + width="313"> - There are unsaved changes to the current tab + There are unsaved changes @@ -26,6 +26,14 @@ background_visible="true" name="group_join_free"> Free + + -