From e4e4977f5eab5aac24c32b569c5273c4be926cb2 Mon Sep 17 00:00:00 2001 From: callum Date: Fri, 11 Nov 2011 12:29:04 -0800 Subject: EXP-1527 FIX Debug values for windowwidth and windowheight can be set below minimum required values and EXP-1528 Launching viewer with a settings.xml file with windowwidth and windowheight set below minimum values, launches to those values not minimum window size --- indra/newview/llappviewer.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 8bf4d94059..9b8f5c5961 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2860,10 +2860,22 @@ 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"), - gSavedSettings.getS32("WindowWidth"), gSavedSettings.getS32("WindowHeight"), + window_width, window_height, gSavedSettings.getBOOL("WindowFullScreen"), ignorePixelDepth); LL_INFOS("AppInit") << "gViewerwindow created." << LL_ENDL; -- cgit v1.2.3 From 20221c8e77824068d4a54885f5c57ace1c9660a2 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 28 Nov 2011 12:51:15 -0800 Subject: EXP-1485 FIX -- Viewer should have a minimum size moved min size logic into LLWindow --- indra/newview/llappviewer.cpp | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) (limited to 'indra/newview/llappviewer.cpp') 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; -- cgit v1.2.3