summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2011-11-28 12:51:15 -0800
committerRichard Linden <none@none>2011-11-28 12:51:15 -0800
commit20221c8e77824068d4a54885f5c57ace1c9660a2 (patch)
tree8b09fa03102129fe21b96320a2f3071b15f6998e /indra/newview/llappviewer.cpp
parent8a442d5edb9074fa76856fc739b362a7374bc1cf (diff)
EXP-1485 FIX -- Viewer should have a minimum size
moved min size logic into LLWindow
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rwxr-xr-xindra/newview/llappviewer.cpp30
1 files changed, 14 insertions, 16 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 9b8f5c5961..106b272767 100755
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -2861,22 +2861,20 @@ bool LLAppViewer::initWindow()
// always start windowed
BOOL ignorePixelDepth = gSavedSettings.getBOOL("IgnorePixelDepth");
- // clamp to minimum window size
- U32 min_window_width=gSavedSettings.getU32("MinWindowWidth");
- U32 window_width=gSavedSettings.getU32("WindowWidth");
- if ( window_width < min_window_width )
- window_width=min_window_width;
-
- U32 min_window_height=gSavedSettings.getU32("MinWindowHeight");
- U32 window_height=gSavedSettings.getU32("WindowHeight");
- if ( window_height < min_window_height )
- window_height=min_window_height;
-
- gViewerWindow = new LLViewerWindow(gWindowTitle,
- VIEWER_WINDOW_CLASSNAME,
- gSavedSettings.getS32("WindowX"), gSavedSettings.getS32("WindowY"),
- window_width, window_height,
- gSavedSettings.getBOOL("WindowFullScreen"), ignorePixelDepth);
+ LLViewerWindow::Params window_params;
+ window_params
+ .title(gWindowTitle)
+ .name(VIEWER_WINDOW_CLASSNAME)
+ .x(gSavedSettings.getS32("WindowX"))
+ .y(gSavedSettings.getS32("WindowY"))
+ .width(gSavedSettings.getU32("WindowWidth"))
+ .height(gSavedSettings.getU32("WindowHeight"))
+ .min_width(gSavedSettings.getU32("MinWindowWidth"))
+ .min_height(gSavedSettings.getU32("MinWindowHeight"))
+ .fullscreen(gSavedSettings.getBOOL("WindowFullScreen"))
+ .ignore_pixel_depth(ignorePixelDepth);
+
+ gViewerWindow = new LLViewerWindow(window_params);
LL_INFOS("AppInit") << "gViewerwindow created." << LL_ENDL;