diff options
author | Callum Prentice <callum@lindenlab.com> | 2010-01-20 15:30:07 -0800 |
---|---|---|
committer | Callum Prentice <callum@lindenlab.com> | 2010-01-20 15:30:07 -0800 |
commit | 8aadfb1cb63a9527835c6c5127d041d924455505 (patch) | |
tree | 3fd5f231cae133ec25f0d0d4bf9eda53d0d4c0e4 /indra/llui/llfloater.cpp | |
parent | 622f8b59ceb286f955351b6185a98919f03ed136 (diff) | |
parent | 20af2d325a4340aca997efbea752849e9f15d041 (diff) |
Merge with tip
Diffstat (limited to 'indra/llui/llfloater.cpp')
-rw-r--r-- | indra/llui/llfloater.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 980cd2abd7..4f519afa06 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -2362,7 +2362,7 @@ void LLFloaterView::adjustToFitScreen(LLFloater* floater, BOOL allow_partial_out LLRect::tCoordType screen_width = getSnapRect().getWidth(); LLRect::tCoordType screen_height = getSnapRect().getHeight(); - + // only automatically resize non-minimized, resizable floaters if( floater->isResizable() && !floater->isMinimized() ) { @@ -2387,16 +2387,13 @@ void LLFloaterView::adjustToFitScreen(LLFloater* floater, BOOL allow_partial_out new_width = llmax(new_width, min_width); new_height = llmax(new_height, min_height); + LLRect new_rect; + new_rect.setLeftTopAndSize(view_rect.mLeft,view_rect.mTop,new_width, new_height); + floater->reshape( new_width, new_height, TRUE ); - if (floater->followsRight()) - { - floater->translate(old_width - new_width, 0); - } + floater->setRect(new_rect); - if (floater->followsTop()) - { - floater->translate(0, old_height - new_height); - } + floater->translateIntoRect( getLocalRect(), false ); } } |