EXT-8274 FIXED Avoided message truncation on tip toasts.

Details:
Made max message line count configurable and by default 10 lines.

reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/730/

--HG--
branch : product-engine
Alexei Arabadji 2010-07-12 17:49:46 +03:00
parent dcf21a1287
commit 1cdf970d10
3 changed files with 18 additions and 4 deletions

View File

@ -11857,5 +11857,16 @@
<key>Value</key>
<integer>1</integer>
</map>
<key>TipToastMessageLineCount</key>
<map>
<key>Comment</key>
<string>Max line count of text message on tip toast.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>S32</string>
<key>Value</key>
<integer>10</integer>
</map>
</map>
</llsd>

View File

@ -35,6 +35,7 @@
#include "llpanelgenerictip.h"
#include "llnotifications.h"
#include "llviewercontrol.h" // for gSavedSettings
LLPanelGenericTip::LLPanelGenericTip(
@ -45,7 +46,8 @@ LLPanelGenericTip::LLPanelGenericTip(
childSetValue("message", notification->getMessage());
// set line max count to 3 in case of a very long name
snapToMessageHeight(getChild<LLTextBox> ("message"), 3);
S32 max_line_count = gSavedSettings.getS32("TipToastMessageLineCount");
snapToMessageHeight(getChild<LLTextBox> ("message"), max_line_count);
}

View File

@ -34,6 +34,7 @@
#include "llnotifications.h"
#include "llpanelonlinestatus.h"
#include "llviewercontrol.h" // for gSavedSettings
LLPanelOnlineStatus::LLPanelOnlineStatus(
const LLNotificationPtr& notification) :
@ -54,7 +55,7 @@ LLPanelOnlineStatus::LLPanelOnlineStatus(
notification, notification->getResponseTemplate()));
}
// set line max count to 3 in case of a very long name
snapToMessageHeight(getChild<LLTextBox> ("message"), 3);
S32 max_line_count = gSavedSettings.getS32("TipToastMessageLineCount");
snapToMessageHeight(getChild<LLTextBox> ("message"), max_line_count);
}