diff options
author | Josh Bell <josh@lindenlab.com> | 2007-12-29 01:40:57 +0000 |
---|---|---|
committer | Josh Bell <josh@lindenlab.com> | 2007-12-29 01:40:57 +0000 |
commit | d06e5e3519f13197dd62bfbabf76f7efcc3d7a79 (patch) | |
tree | 62b363ba11a3cc7dd78343e63ad440284f0252f3 /indra/newview/llviewerwindow.cpp | |
parent | 79680891a73be074aa449a9ccdf695b0afd300d8 (diff) |
svn merge -r 76642:76643 svn+ssh://svn.lindenlab.com/svn/linden/qa/maintenance-4-merge-76640
Redo of QAR-170, with correct range. Reviewed by CG.
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 2a496f6698..405a705b62 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1781,6 +1781,22 @@ void adjust_rect_bottom_center(const LLString& control, const LLRect& window) } } + +void update_saved_window_size(const LLString& control,S32 delta_width, S32 delta_height) +{ + if (delta_width || delta_height ) + { + LLRect mXMLRect = gSavedSettings.getRect(control); + //hard code it all follows the right and top + mXMLRect.mRight += delta_width; + mXMLRect.mTop += delta_height; + mXMLRect.mLeft = llmax (0, mXMLRect.mLeft+delta_width); + mXMLRect.mBottom = llmax(0,mXMLRect.mBottom+delta_height); + gSavedSettings.setRect(control,mXMLRect); + } +} + + // Many rectangles can't be placed until we know the screen size. // These rectangles have their bottom-left corner as 0,0 void LLViewerWindow::adjustRectanglesForFirstUse(const LLRect& window) @@ -2059,7 +2075,7 @@ void LLViewerWindow::reshape(S32 width, S32 height) glViewport(0, 0, width, height ); if (height > 0 && gCamera) - { + { gCamera->setViewHeightInPixels( height ); if (mWindow->getFullscreen()) { @@ -2072,6 +2088,9 @@ void LLViewerWindow::reshape(S32 width, S32 height) } } + // changes in window's width and hight + S32 delta_width = width - mWindowRect.getWidth(); + S32 delta_height = height - mWindowRect.getHeight(); // update our window rectangle mWindowRect.mRight = mWindowRect.mLeft + width; mWindowRect.mTop = mWindowRect.mBottom + height; @@ -2122,6 +2141,12 @@ void LLViewerWindow::reshape(S32 width, S32 height) { gSavedSettings.setS32("WindowWidth", window_size.mX); gSavedSettings.setS32("WindowHeight", window_size.mY); + if (!gFloaterMap) + { + update_saved_window_size("FloaterWorldMapRect",delta_width, delta_height); + update_saved_window_size("FloaterMapRect",delta_width, delta_height); + } + } } |