diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2022-08-31 12:04:10 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2022-08-31 12:04:10 -0400 |
commit | 13456d01a71b873ed59e3839f817434357fc8da5 (patch) | |
tree | 43242564df171301b7518e2e41b0d81a144ec05d /indra/llui/llfloater.cpp | |
parent | 96ec4b3a54268416e59fe68e597e5aea4579bd44 (diff) | |
parent | d31a83fb946c49a38376ea3b312b5380d0c8c065 (diff) |
DRTVWR-568: Merge branch 'master' into fix-monterey for D483 release.
Diffstat (limited to 'indra/llui/llfloater.cpp')
-rw-r--r-- | indra/llui/llfloater.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 03efd09689..c6a3ada777 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -259,6 +259,7 @@ LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p) mMinHeight(p.min_height), mHeaderHeight(p.header_height), mLegacyHeaderHeight(p.legacy_header_height), + mDefaultRectForGroup(true), mMinimized(FALSE), mForeground(FALSE), mFirstLook(TRUE), @@ -906,7 +907,10 @@ bool LLFloater::applyRectControl() if (last_in_group && last_in_group != this) { // other floaters in our group, position ourselves relative to them and don't save the rect - mRectControl.clear(); + if (mDefaultRectForGroup) + { + mRectControl.clear(); + } mPositioning = LLFloaterEnums::POSITIONING_CASCADE_GROUP; } else @@ -3481,8 +3485,15 @@ void LLFloater::stackWith(LLFloater& other) } next_rect.translate(floater_offset, -floater_offset); - next_rect.setLeftTopAndSize(next_rect.mLeft, next_rect.mTop, getRect().getWidth(), getRect().getHeight()); - + const LLRect& rect = getControlGroup()->getRect(mRectControl); + if (rect.notEmpty() && !mDefaultRectForGroup && mResizable) + { + next_rect.setLeftTopAndSize(next_rect.mLeft, next_rect.mTop, llmax(mMinWidth, rect.getWidth()), llmax(mMinHeight, rect.getHeight())); + } + else + { + next_rect.setLeftTopAndSize(next_rect.mLeft, next_rect.mTop, getRect().getWidth(), getRect().getHeight()); + } setShape(next_rect); if (!other.getHost()) |