diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp index aa3ca68980..5d23590413 100755 --- a/indra/newview/lltoastnotifypanel.cpp +++ b/indra/newview/lltoastnotifypanel.cpp @@ -503,6 +503,7 @@ void LLIMToastNotifyPanel::compactButtons() const child_list_t* children = getControlPanel()->getChildList(); S32 offset = 0; + S32 last_bottom = 0; // Fix stacked buttons offset // Children were added by addChild() which uses push_front to insert them into list, // so to get buttons in correct order reverse iterator is used (EXT-5906) for (child_list_t::const_reverse_iterator it = children->rbegin(); it != children->rend(); it++) @@ -510,6 +511,12 @@ void LLIMToastNotifyPanel::compactButtons() LLButton * button = dynamic_cast (*it); if (button != NULL) { + // Fix stacked buttons offset + if (last_bottom != button->getRect().mBottom) + { + offset = 0; + } + // button->setOrigin( offset,button->getRect().mBottom); button->setLeftHPad(2 * HPAD); button->setRightHPad(2 * HPAD); @@ -522,6 +529,8 @@ void LLIMToastNotifyPanel::compactButtons() button->autoResize(); offset += HPAD + button->getRect().getWidth(); button->setFollowsNone(); + // Fix stacked buttons offset + last_bottom = button->getRect().mBottom; } }