summaryrefslogtreecommitdiff
path: root/indra/llui/llmodaldialog.cpp
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2026-09-30 17:57:35 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2026-09-30 17:57:35 +0300
commit7f3c72b84d2699b1ba8b0fcb5b1d38398bb9d0a8 (patch)
treeb917b6c11d99cb2151132722e89c97000be44714 /indra/llui/llmodaldialog.cpp
parentada5195605d925258b1bc7c75124505b27c3a52b (diff)
Fix modal floater re-centering against a different rect, which caused visual jump
Diffstat (limited to 'indra/llui/llmodaldialog.cpp')
-rw-r--r--indra/llui/llmodaldialog.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/llui/llmodaldialog.cpp b/indra/llui/llmodaldialog.cpp
index 73f3914160..0db9c20b20 100644
--- a/indra/llui/llmodaldialog.cpp
+++ b/indra/llui/llmodaldialog.cpp
@@ -29,6 +29,7 @@
#include "llmodaldialog.h"
#include "llemojihelper.h"
+#include "llfloater.h"
#include "llfocusmgr.h"
#include "v4color.h"
#include "v2math.h"
@@ -306,8 +307,10 @@ void LLModalDialog::draw()
void LLModalDialog::centerOnScreen()
{
- LLVector2 window_size = LLUI::getInstance()->getWindowSize();
- centerWithin(LLRect(0, 0, ll_round(window_size.mV[VX]), ll_round(window_size.mV[VY])));
+ // Use the floater view's rect (same as LLFloater::center()) rather than the raw
+ // window size, otherwise a reshape after the initial centering (e.g. triggered by embedded
+ // media content settling) re-centers the dialog against a different rect.
+ centerWithin(gFloaterView->getRect());
}
// static