summaryrefslogtreecommitdiff
path: root/indra/llui/llfloater.cpp
diff options
context:
space:
mode:
authorCallum Prentice <callum@lindenlab.com>2010-02-04 17:03:41 -0800
committerCallum Prentice <callum@lindenlab.com>2010-02-04 17:03:41 -0800
commit259fa5fd0b67459145eb5463d79f37271ee7af0a (patch)
tree27c7eaddb0c6f7dd406228e3a61fc89b6fedb159 /indra/llui/llfloater.cpp
parent80139d95adbcb2258c5541a4e0ace32f32b78ba5 (diff)
parenta4aed31ad9fd1874b134af87145ec93b283dbbfb (diff)
Merge with tip
Diffstat (limited to 'indra/llui/llfloater.cpp')
-rw-r--r--indra/llui/llfloater.cpp21
1 files changed, 10 insertions, 11 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 980cd2abd7..de46d89d6f 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -1360,6 +1360,7 @@ void LLFloater::bringToFront( S32 x, S32 y )
// virtual
void LLFloater::setVisibleAndFrontmost(BOOL take_focus)
{
+ gFocusMgr.setTopCtrl(NULL);
setVisible(TRUE);
setFrontmost(take_focus);
}
@@ -1915,9 +1916,10 @@ static LLDefaultChildRegistry::Register<LLFloaterView> r("floater_view");
LLFloaterView::LLFloaterView (const Params& p)
: LLUICtrl (p),
+
mFocusCycleMode(FALSE),
- mSnapOffsetBottom(0)
- ,mSnapOffsetRight(0)
+ mSnapOffsetBottom(0),
+ mSnapOffsetRight(0)
{
}
@@ -2362,7 +2364,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 +2389,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 );
}
}