summaryrefslogtreecommitdiff
path: root/indra/llui/llfloater.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2010-05-18 16:26:18 -0700
committerRichard Linden <none@none>2010-05-18 16:26:18 -0700
commit5921f2c14b57bbc4c5c327713a521e270b250f52 (patch)
tree46b3e42c721f7402026cade6456877bec5594a41 /indra/llui/llfloater.cpp
parent3e0c0b86c0fb1a1c26d020ca44a30365487edf3b (diff)
EXT-7398 FIXED negative top/bottom coordinates do the wrong thing with topleft layout
reviewed by Leyla
Diffstat (limited to 'indra/llui/llfloater.cpp')
-rw-r--r--indra/llui/llfloater.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 79c47a1136..6babaf936b 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -169,6 +169,7 @@ LLFloater::Params::Params()
save_rect("save_rect", false),
save_visibility("save_visibility", false),
can_dock("can_dock", false),
+ open_centered("open_centered", false),
header_height("header_height", 0),
legacy_header_height("legacy_header_height", 0),
close_image("close_image"),
@@ -763,6 +764,13 @@ void LLFloater::applySavedVariables()
void LLFloater::applyRectControl()
{
+ // first, center on screen if requested
+ if (mOpenCentered)
+ {
+ center();
+ }
+
+ // override center if we have saved rect control
if (mRectControl.size() > 1)
{
const LLRect& rect = LLUI::sSettingGroups["floater"]->getRect(mRectControl);
@@ -2711,6 +2719,7 @@ void LLFloater::initFromParams(const LLFloater::Params& p)
mLegacyHeaderHeight = p.legacy_header_height;
mSingleInstance = p.single_instance;
mAutoTile = p.auto_tile;
+ mOpenCentered = p.open_centered;
if (p.save_rect)
{