diff options
author | Steven Bennetts <steve@lindenlab.com> | 2008-03-11 01:47:36 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2008-03-11 01:47:36 +0000 |
commit | 377ae59c21215473cf05e3cb8a86eb14c9e7715c (patch) | |
tree | a8cb48901c3c30bc1c2ddfd5d8b2d0cab7c6c95d /indra/newview/llviewerwindow.cpp | |
parent | 9d12bd5e273b8cb032e25574461a8b4528d96343 (diff) |
merge Branch_1-19-1-Viewer -r 80930 : 81609 -> release
DEV-11202: Unhandled Excpetion in pipeline.cpp.
Merged over updated windlight ui help text from windlight14.
Reverting a const change in a virtual that was not propagated to all overrides.
DEV-10957 stop and pause Media and music buttons do not work
DEV-10762 Displayed page in the client browser disappears when crossing property boundaries.
DEV-11220 replace misspellings in alerts.xml parameters of 'messsage'
DEV-11221 fix a misspelling of 'participants' in floater_chat_history.xml tooltip
DEV-11193 clean up some viewer strings related to Windlight help text
svn merge -r81144:81147 svn+ssh://svn/svn/linden/branches/1-19-1-viewer-threads
DEV-11110 Media browser history dropdown does not save items across sessions
Ran the xuiparse -process tool on all en-us xml files. This does NOT change any data, merely reorders attributes and cleans up tab/spacing.
DEV-11349 XML CLEANUP: fix duplicate sibling names in en-us xui files
DEV-11348 Change to llmimetypes.cpp broke Media Type dropdown
dev-10623 "parcels that played movies no longer work in combo-merge-ui"
DEV-11379 - crash in LLTabContainer::draw()
DEV-11377 Elminiate dangerous LLLinkedList and LLDoubleLinkedList from newview
DEV-11158 sculpties on the top10 crash list
DEV-11404 "Send Current URL to Parcel" does not set the MIME type
merge 80958:80959 maint-ui-9-qa, DEV-11105 -- Searching for people with 3 characters like "j l" hurts the database.
DEV-10489: no draw distance cheating
DEV-879: water noise frequency
DEV-10764: macbook air support
DEV-10878: Linux Intel945 support
DEV-7551: featuretable adjustments for framerate.
DEV-11426 Enormous mini-map.
DEV-11505 - Crash in gunzip_file.
Removed final LinkedList, SkipMap, and AssocList templates from the Viewer!
DEV-11115 truncated word in the Advanced Water Editor's modal help dialog
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 52 |
1 files changed, 19 insertions, 33 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index d1e67bfbbd..dcceb397d3 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -57,7 +57,6 @@ // linden library includes #include "audioengine.h" // mute on minimize #include "indra_constants.h" -#include "linked_lists.h" #include "llassetstorage.h" #include "llfontgl.h" #include "llrect.h" @@ -1812,18 +1811,23 @@ 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) +void adjust_rect_centered_partial_zoom(const LLString& control, + const LLRect& window) { - 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); + LLRect rect = gSavedSettings.getRect(control); + // Only adjust on first use + if (rect.mLeft == 0 && rect.mBottom == 0) + { + S32 width = window.getWidth(); + S32 height = window.getHeight(); + rect.set(0, height-STATUS_BAR_HEIGHT, width, TOOL_BAR_HEIGHT); + // Make floater fill 80% of window, leaving 20% padding on + // the sides. + const F32 ZOOM_FRACTION = 0.8f; + S32 dx = (S32)(width * (1.f - ZOOM_FRACTION)); + S32 dy = (S32)(height * (1.f - ZOOM_FRACTION)); + rect.stretch(-dx/2, -dy/2); + gSavedSettings.setRect(control, rect); } } @@ -1848,7 +1852,7 @@ void LLViewerWindow::adjustRectanglesForFirstUse(const LLRect& window) adjust_rect_top_left("FloaterGestureRect2", window); - adjust_rect_top_right("FloaterMapRect", window); + adjust_rect_top_right("FloaterMiniMapRect", window); adjust_rect_top_right("FloaterLagMeter", window); @@ -1917,17 +1921,8 @@ void LLViewerWindow::initWorldUI() LLWorldMapView::initClass(); - LLRect world_map_rect = gSavedSettings.getRect("FloaterWorldMapRect"); - // if 0,0,0,0 then use fullscreen - if (world_map_rect.mTop == 0 - && world_map_rect.mLeft == 0 - && world_map_rect.mRight == 0 - && world_map_rect.mBottom == 0) - { - world_map_rect.set(0, height-TOOL_BAR_HEIGHT, width, STATUS_BAR_HEIGHT); - world_map_rect.stretch(-4); - gSavedSettings.setRect("FloaterWorldMapRect", world_map_rect); - } + adjust_rect_centered_partial_zoom("FloaterWorldMapRect2", full_window); + gFloaterWorldMap = new LLFloaterWorldMap(); gFloaterWorldMap->setVisible(FALSE); @@ -2121,9 +2116,6 @@ 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; @@ -2174,12 +2166,6 @@ 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); - } - } } |