MAINT-6880 Viewer notification was not centered.

meow-7.2.2
andreykproductengine 2016-11-09 20:32:19 +02:00
parent 5921cc9d8a
commit 3d870a9c17
1 changed files with 8 additions and 0 deletions

View File

@ -117,6 +117,14 @@ BOOL LLScreenChannelBase::postBuild()
void LLScreenChannelBase::reshape(S32 width, S32 height, BOOL called_from_parent)
{
if (mChannelAlignment == CA_CENTRE)
{
// Keep notifications and alerts centered
// WorldViewRectScaled is out of date at reshape but Window has same width
S32 channel_bound = gViewerWindow->getWindowRectScaled().getWidth() / 2;
setRect(LLRect(channel_bound, 0, channel_bound, 0));
updateRect(); //sets top and bottom only
}
redrawToasts();
}