summaryrefslogtreecommitdiff
path: root/indra/llui/llfloater.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-01-20 13:54:34 -0800
committerTofu Linden <tofu.linden@lindenlab.com>2010-01-20 13:54:34 -0800
commita65188d85f75e848d224bd335a00ed8aa51f945e (patch)
treef43b390cba45d047fc0fa31659f6969f62b925d1 /indra/llui/llfloater.cpp
parent1a8008ea150d1eb9a8f4036988ef971fb1901cb3 (diff)
parent5ca943cd0279d35ffdf584fa0de3b795645f276c (diff)
Merge from viewer2. Minor conflict resolved.
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 a17e306325..4f519afa06 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -233,6 +233,7 @@ LLFloater::LLFloater(const LLSD& key, const LLFloater::Params& p)
mAutoFocus(TRUE), // automatically take focus when opened
mCanDock(false),
mDocked(false),
+ mTornOff(false),
mHasBeenDraggedWhileMinimized(FALSE),
mPreviousMinimizedBottom(0),
mPreviousMinimizedLeft(0)
@@ -1456,6 +1457,7 @@ void LLFloater::onClickTearOff(LLFloater* self)
}
self->setTornOff(false);
}
+ self->updateButtons();
}
// static
@@ -1748,8 +1750,8 @@ void LLFloater::updateButtons()
if (i == BUTTON_HELP)
{
// don't show the help button if the floater is minimized
- // or if it is a tear-off hosted floater
- if (isMinimized() || mButtonsEnabled[BUTTON_TEAR_OFF])
+ // or if it is a docked tear-off floater
+ if (isMinimized() || (mButtonsEnabled[BUTTON_TEAR_OFF] && ! mTornOff))
{
enabled = false;
}
@@ -2360,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() )
{
@@ -2385,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 );
}
}