summaryrefslogtreecommitdiff
path: root/indra/llui/llfloater.cpp
diff options
context:
space:
mode:
authorBrad Kittenbrink <brad@lindenlab.com>2008-02-27 18:58:14 +0000
committerBrad Kittenbrink <brad@lindenlab.com>2008-02-27 18:58:14 +0000
commit6d52efe452aa8469e0343da1c7d108f3f52ab651 (patch)
treea87be48e9840d7fc1f7ee514d7c7f994e71fdb3c /indra/llui/llfloater.cpp
parent6027ad2630b8650cabcf00628ee9b0d25bedd67f (diff)
Merge of windlight into release (QAR-286). This includes all changes in
windlight14 which have passed QA (up through r79932). svn merge -r 80831:80833 svn+ssh://svn.lindenlab.com/svn/linden/branches/merge_windlight14_r80620
Diffstat (limited to 'indra/llui/llfloater.cpp')
-rw-r--r--indra/llui/llfloater.cpp30
1 files changed, 14 insertions, 16 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 68719bea40..fed39b7917 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -2123,42 +2123,40 @@ void LLFloaterView::adjustToFitScreen(LLFloater* floater, BOOL allow_partial_out
if( floater->isResizable() )
{
LLRect view_rect = floater->getRect();
- S32 view_width = view_rect.getWidth();
- S32 view_height = view_rect.getHeight();
+ S32 old_width = view_rect.getWidth();
+ S32 old_height = view_rect.getHeight();
S32 min_width;
S32 min_height;
floater->getResizeLimits( &min_width, &min_height );
// Make sure floater isn't already smaller than its min height/width?
- S32 new_width = llmax( min_width, view_width );
- S32 new_height = llmax( min_height, view_height );
+ S32 new_width = llmax( min_width, old_width );
+ S32 new_height = llmax( min_height, old_height);
- if( !allow_partial_outside
- && ( (new_width > screen_width)
- || (new_height > screen_height) ) )
+ if((new_width > screen_width) || (new_height > screen_height))
{
- // We have to force this window to be inside the screen.
+ // We have to make this window able to fit on screen
new_width = llmin(new_width, screen_width);
new_height = llmin(new_height, screen_height);
- // Still respect minimum width/height
+ // ...while respecting minimum width/height
new_width = llmax(new_width, min_width);
new_height = llmax(new_height, min_height);
floater->reshape( new_width, new_height, TRUE );
+ if (floater->followsRight())
+ {
+ floater->translate(old_width - new_width, 0);
+ }
- // Make sure the damn thing is actually onscreen.
- if (floater->translateIntoRect(snap_rect_local, FALSE))
+ if (floater->followsTop())
{
- floater->clearSnapTarget();
+ floater->translate(0, old_height - new_height);
}
}
- else if (!floater->isMinimized())
- {
- floater->reshape(new_width, new_height, TRUE);
- }
}
+ // move window fully onscreen
if (floater->translateIntoRect( snap_rect_local, allow_partial_outside ))
{
floater->clearSnapTarget();