Skip to content
Snippets Groups Projects
Commit aba8b04c authored by Dmitry Oleshko's avatar Dmitry Oleshko
Browse files

fix of a normal bug (EXT-2448) [BSI] Notification toasts should resize when...

fix of a normal bug (EXT-2448) [BSI] Notification toasts should resize when text is to long to be displayed

A maximum number of characters for textbox/texteditor could be set only through XML.
In case when a corresponding attribute was absent - the maximun number was set to 255, and there were no chance (no function) to change it.
So in this fix such a function was added.

--HG--
branch : product-engine
parent 914e76fe
No related branches found
No related tags found
No related merge requests found
...@@ -139,6 +139,7 @@ class LLTextBase ...@@ -139,6 +139,7 @@ class LLTextBase
// TODO: add optional style parameter // TODO: add optional style parameter
virtual void setText(const LLStringExplicit &utf8str , const LLStyle::Params& input_params = LLStyle::Params()); // uses default style virtual void setText(const LLStringExplicit &utf8str , const LLStyle::Params& input_params = LLStyle::Params()); // uses default style
virtual std::string getText() const; virtual std::string getText() const;
void setMaxTextLength(S32 length) { mMaxTextByteLength = length; }
// wide-char versions // wide-char versions
void setWText(const LLWString& text); void setWText(const LLWString& text);
......
...@@ -128,6 +128,7 @@ mAddedDefaultBtn(false) ...@@ -128,6 +128,7 @@ mAddedDefaultBtn(false)
// *TODO: magic numbers(???) - copied from llnotify.cpp(250) // *TODO: magic numbers(???) - copied from llnotify.cpp(250)
const S32 MAX_LENGTH = 512 + 20 + DB_FIRST_NAME_BUF_SIZE + DB_LAST_NAME_BUF_SIZE + DB_INV_ITEM_NAME_BUF_SIZE; const S32 MAX_LENGTH = 512 + 20 + DB_FIRST_NAME_BUF_SIZE + DB_LAST_NAME_BUF_SIZE + DB_INV_ITEM_NAME_BUF_SIZE;
mTextBox->setMaxTextLength(MAX_LENGTH);
mTextBox->setVisible(TRUE); mTextBox->setVisible(TRUE);
mTextBox->setValue(notification->getMessage()); mTextBox->setValue(notification->getMessage());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment