diff options
author | andreykproductengine <andreykproductengine@lindenlab.com> | 2018-12-12 15:24:26 +0200 |
---|---|---|
committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2018-12-12 15:24:26 +0200 |
commit | c658e891345fd98dcededa5c21efc17993805522 (patch) | |
tree | 8a43c5821ae8197d7d9b0ae980608915f4d5b664 /indra/newview/lltoastnotifypanel.cpp | |
parent | 1e5ad657abcff4f3bd8d4b6f870e15b75215799d (diff) |
SL-9512 Move constant to common place
Diffstat (limited to 'indra/newview/lltoastnotifypanel.cpp')
-rw-r--r-- | indra/newview/lltoastnotifypanel.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index e3a856be5c..a2116817a2 100644 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -46,8 +46,6 @@ const S32 BOTTOM_PAD = VPAD * 3; const S32 IGNORE_BTN_TOP_DELTA = 3*VPAD;//additional ignore_btn padding S32 BUTTON_WIDTH = 90; -// *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; //static @@ -319,7 +317,7 @@ void LLToastNotifyPanel::init( LLRect rect, bool show_images ) mTextBox = getChild<LLTextEditor>("text_editor_box"); } - mTextBox->setMaxTextLength(MAX_LENGTH); + mTextBox->setMaxTextLength(LLToastPanel::MAX_TEXT_LENGTH); mTextBox->setVisible(TRUE); mTextBox->setPlainText(!show_images); mTextBox->setContentTrusted(is_content_trusted); @@ -411,7 +409,7 @@ void LLToastNotifyPanel::init( LLRect rect, bool show_images ) //.xml file intially makes info panel only follow left/right/top. This is so that when control buttons are added the info panel //can shift upward making room for the buttons inside mControlPanel. After the buttons are added, the info panel can then be set to follow 'all'. mInfoPanel->setFollowsAll(); - snapToMessageHeight(mTextBox, MAX_LENGTH); + snapToMessageHeight(mTextBox, LLToastPanel::MAX_TEXT_LENGTH); // reshape the panel to its previous size if (current_rect.notEmpty()) @@ -472,7 +470,7 @@ void LLIMToastNotifyPanel::snapToMessageHeight() //Add message height if it is visible if (mTextBox->getVisible()) { - S32 new_panel_height = computeSnappedToMessageHeight(mTextBox, MAX_LENGTH); + S32 new_panel_height = computeSnappedToMessageHeight(mTextBox, LLToastPanel::MAX_TEXT_LENGTH); //reshape the panel with new height if (new_panel_height != getRect().getHeight()) |