diff options
| author | maxim_productengine <mnikolenko@productengine.com> | 2019-11-22 18:26:56 +0200 | 
|---|---|---|
| committer | maxim_productengine <mnikolenko@productengine.com> | 2019-11-22 18:26:56 +0200 | 
| commit | 4acfc99fa608269d06a5a3e45a4c3fdc5e3d06ee (patch) | |
| tree | c1eb60d1bae02cb2699be39b0f1c0ac828b57807 | |
| parent | 5eecc6cad91136434b2cd22202392afbd5e37f25 (diff) | |
SL-12317 UI Changes to Group limits
| -rw-r--r-- | indra/llui/lltextbase.cpp | 8 | ||||
| -rw-r--r-- | indra/llui/lltextbase.h | 6 | ||||
| -rw-r--r-- | indra/newview/llpanelpeople.cpp | 15 | ||||
| -rw-r--r-- | indra/newview/lltoastalertpanel.cpp | 5 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 18 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/panel_people.xml | 3 | 
6 files changed, 44 insertions, 11 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp index 22635f734e..8a4b224310 100644 --- a/indra/llui/lltextbase.cpp +++ b/indra/llui/lltextbase.cpp @@ -152,6 +152,7 @@ LLTextBase::Params::Params()  	plain_text("plain_text",false),  	track_end("track_end", false),  	read_only("read_only", false), +	skip_link_underline("skip_link_underline", false),  	spellcheck("spellcheck", false),  	v_pad("v_pad", 0),  	h_pad("h_pad", 0), @@ -183,6 +184,7 @@ LLTextBase::LLTextBase(const LLTextBase::Params &p)  	mFontShadow(p.font_shadow),  	mPopupMenuHandle(),  	mReadOnly(p.read_only), +	mSkipLinkUnderline(p.skip_link_underline),  	mSpellCheck(p.spellcheck),  	mSpellCheckStart(-1),  	mSpellCheckEnd(-1), @@ -2289,7 +2291,7 @@ void LLTextBase::appendAndHighlightTextImpl(const std::string &new_text, S32 hig  			S32 cur_length = getLength();  			LLStyleConstSP sp(new LLStyle(highlight_params));  			LLTextSegmentPtr segmentp; -			if(underline_on_hover_only) +			if (underline_on_hover_only || mSkipLinkUnderline)  			{  				highlight_params.font.style("NORMAL");  				LLStyleConstSP normal_sp(new LLStyle(highlight_params)); @@ -2313,7 +2315,7 @@ void LLTextBase::appendAndHighlightTextImpl(const std::string &new_text, S32 hig  		S32 segment_start = old_length;  		S32 segment_end = old_length + wide_text.size();  		LLStyleConstSP sp(new LLStyle(style_params)); -		if (underline_on_hover_only) +		if (underline_on_hover_only || mSkipLinkUnderline)  		{  			LLStyle::Params normal_style_params(style_params);  			normal_style_params.font.style("NORMAL"); @@ -3488,7 +3490,7 @@ F32 LLOnHoverChangeableTextSegment::draw(S32 start, S32 end, S32 selection_start  /*virtual*/  BOOL LLOnHoverChangeableTextSegment::handleHover(S32 x, S32 y, MASK mask)  { -	mStyle = mHoveredStyle; +	mStyle = mEditor.getSkipLinkUnderline() ? mNormalStyle : mHoveredStyle;  	return LLNormalTextSegment::handleHover(x, y, mask);  } diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h index 9831c35858..86aecf9236 100644 --- a/indra/llui/lltextbase.h +++ b/indra/llui/lltextbase.h @@ -309,6 +309,7 @@ public:  								border_visible,  								track_end,  								read_only, +								skip_link_underline,  								spellcheck,  								allow_scroll,  								plain_text, @@ -448,6 +449,9 @@ public:  	void					setReadOnly(bool read_only) { mReadOnly = read_only; }  	bool					getReadOnly() { return mReadOnly; } +	void					setSkipLinkUnderline(bool skip_link_underline) { mSkipLinkUnderline = skip_link_underline; } +	bool					getSkipLinkUnderline() { return mSkipLinkUnderline;  } +  	void					setPlainText(bool value) { mPlainText = value;}  	bool					getPlainText() const { return mPlainText; } @@ -691,6 +695,8 @@ protected:  	bool						mAutoIndent;  	S32							mMaxTextByteLength;	// Maximum length mText is allowed to be in bytes +	bool						mSkipLinkUnderline; +  	// support widgets  	LLHandle<LLContextMenu>		mPopupMenuHandle;  	LLView*						mDocumentView; diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 2e991e425d..3126edc205 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -1086,10 +1086,19 @@ void LLPanelPeople::onGroupLimitInfo()  	S32 max_basic = LLAgentBenefitsMgr::get("Base").getGroupMembershipLimit();  	S32 max_premium = LLAgentBenefitsMgr::get("Premium").getGroupMembershipLimit(); -	args["MAX_BASIC"] = max_basic;  -	args["MAX_PREMIUM"] = max_premium;  +	args["MAX_BASIC"] = max_basic; +	args["MAX_PREMIUM"] = max_premium; -	LLNotificationsUtil::add("GroupLimitInfo", args); +	if (LLAgentBenefitsMgr::has("PremiumPlus")) +	{ +		S32 max_premium_plus = LLAgentBenefitsMgr::get("PremiumPlus").getGroupMembershipLimit(); +		args["MAX_PREMIUM"] = max_premium_plus; +		LLNotificationsUtil::add("GroupLimitInfoPlus", args); +	} +	else +	{ +		LLNotificationsUtil::add("GroupLimitInfo", args); +	}	  }  void LLPanelPeople::onTabSelected(const LLSD& param) diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp index 941cb410fc..bac3a6832e 100644 --- a/indra/newview/lltoastalertpanel.cpp +++ b/indra/newview/lltoastalertpanel.cpp @@ -194,6 +194,11 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal  			- 3*VPAD - BTN_HEIGHT;  	// reshape to calculate real text width and height  	msg_box->reshape( MAX_ALLOWED_MSG_WIDTH, max_allowed_msg_height ); + +	if ("GroupLimitInfo" == mNotification->getName() || "GroupLimitInfoPlus" == mNotification->getName()) +	{ +		msg_box->setSkipLinkUnderline(true); +	}  	msg_box->setValue(msg);  	S32 pixel_width = msg_box->getTextPixelWidth(); diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index c8db5d24dd..670784f3bf 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -4276,11 +4276,21 @@ You have reached your maximum number of groups. Please leave some group before j     icon="alert.tga"     name="GroupLimitInfo"     type="alert"> -The group limit for base accounts is [MAX_BASIC], and for [https://secondlife.com/premium/ premium] -accounts is [MAX_PREMIUM]. -If you downgraded your account, you will need to get below [MAX_BASIC] group limit before you can join more. +Residents with Basic memberships may join up to [MAX_BASIC] groups. +Premium memberships allow up to [MAX_PREMIUM]. [https://secondlife.com/my/account/membership.php? Learn more or upgrade] +    <tag>group</tag> +    <usetemplate +     name="okbutton" +     yestext="Close"/> +  </notification> -[https://secondlife.com/my/account/membership.php Upgrade today!] +  <notification +   icon="alert.tga" +   name="GroupLimitInfoPlus" +   type="alert"> +Residents with Basic memberships may join up to [MAX_BASIC] groups. +Premium memberships allow up to [MAX_PREMIUM]. Premium Plus +memberships allow up to [MAX_PREMIUM_PLUS]. [https://secondlife.com/my/account/membership.php? Learn more or upgrade]      <tag>group</tag>      <usetemplate       name="okbutton" diff --git a/indra/newview/skins/default/xui/en/panel_people.xml b/indra/newview/skins/default/xui/en/panel_people.xml index a47121ae99..c4248d9b92 100644 --- a/indra/newview/skins/default/xui/en/panel_people.xml +++ b/indra/newview/skins/default/xui/en/panel_people.xml @@ -55,7 +55,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M  	 value="[REGION](Double-click to teleport, shift-drag to pan)"/>  	<string  	 name="GroupCountWithInfo" -	 value="You belong to [COUNT] groups, and can join [REMAINING] more.  [secondlife:/// Want more?]"/> +	 value="You belong to [COUNT] groups, and can join [REMAINING] more.  [secondlife:/// Raise your limit]"/>      <tab_container       bottom="-10"       follows="all" @@ -493,6 +493,7 @@ Looking for people to hang out with? Try the [secondlife:///app/worldmap World M                  top_pad="4"                  left="3"                  use_ellipses="true" +                skip_link_underline="true"                  name="groupcount">                You belong to [COUNT] groups, and can join [REMAINING] more.              </text>  | 
