Want ridiculously small viewer window? Here you go.

This commit is contained in:
Siana Gearz
2012-03-22 06:02:39 +01:00
parent 80e53ebb2b
commit 8334277838
4 changed files with 9 additions and 11 deletions

View File

@@ -47,6 +47,9 @@ class LLPreeditor;
class LLWindowCallbacks;
static const S32 MIN_WINDOW_WIDTH = 864;
static const S32 MIN_WINDOW_HEIGHT = 472;
// Refer to llwindow_test in test/common/llwindow for usage example
class LLWindow

View File

@@ -2548,9 +2548,6 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
{
// This is where we would constrain move/resize to a particular screen
const S32 MIN_WIDTH = 1024;
const S32 MIN_HEIGHT = 768;
Rect currentBounds;
Rect previousBounds;
@@ -2575,14 +2572,14 @@ OSStatus LLWindowMacOSX::eventHandler (EventHandlerCallRef myHandler, EventRef e
mPreviousWindowRect = previousBounds;
}
if ((currentBounds.right - currentBounds.left) < MIN_WIDTH)
if ((currentBounds.right - currentBounds.left) < MIN_WINDOW_WIDTH)
{
currentBounds.right = currentBounds.left + MIN_WIDTH;
currentBounds.right = currentBounds.left + MIN_WINDOW_WIDTH;
}
if ((currentBounds.bottom - currentBounds.top) < MIN_HEIGHT)
if ((currentBounds.bottom - currentBounds.top) < MIN_WINDOW_HEIGHT)
{
currentBounds.bottom = currentBounds.top + MIN_HEIGHT;
currentBounds.bottom = currentBounds.top + MIN_WINDOW_HEIGHT;
}
SetEventParameter(event, kEventParamCurrentBounds, typeQDRectangle, sizeof(Rect), &currentBounds);

View File

@@ -71,8 +71,6 @@ extern BOOL gDebugWindowProc;
const S32 MAX_NUM_RESOLUTIONS = 200;
const S32 MIN_WINDOW_WIDTH = 1024;
const S32 MIN_WINDOW_HEIGHT = 768;
// static variable for ATI mouse cursor crash work-around:
static bool ATIbug = false;

View File

@@ -2414,8 +2414,8 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
case WM_GETMINMAXINFO:
{
LPMINMAXINFO min_max = (LPMINMAXINFO)l_param;
min_max->ptMinTrackSize.x = 1024;
min_max->ptMinTrackSize.y = 768;
min_max->ptMinTrackSize.x = MIN_WINDOW_WIDTH;
min_max->ptMinTrackSize.y = MIN_WINDOW_HEIGHT;
return 0;
}