1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-17 00:44:19 +00:00
This commit is contained in:
jules 2008-03-11 11:31:32 +00:00
parent 7bd917a933
commit d7b5413e70
2 changed files with 8 additions and 11 deletions

View file

@ -60,6 +60,8 @@ DocumentWindow::DocumentWindow (const String& title,
{
zeromem (titleBarButtons, sizeof (titleBarButtons));
setResizeLimits (128, 128, 32768, 32768);
lookAndFeelChanged();
}

View file

@ -50,24 +50,16 @@ ResizableWindow::ResizableWindow (const String& name,
contentComponent (0),
resizeToFitContent (false),
fullscreen (false),
constrainer (&defaultConstrainer)
constrainer (0)
#ifdef JUCE_DEBUG
, hasBeenResized (false)
#endif
{
setBackgroundColour (backgroundColour_);
const Rectangle mainMonArea (Desktop::getInstance().getMainMonitorArea());
defaultConstrainer.setSizeLimits (200, 200,
mainMonArea.getWidth(),
mainMonArea.getHeight());
defaultConstrainer.setMinimumOnscreenAmounts (0x10000, 16, 24, 16);
lastNonFullScreenPos.setBounds (50, 50,
defaultConstrainer.getMinimumWidth(),
defaultConstrainer.getMinimumHeight());
lastNonFullScreenPos.setBounds (50, 50, 256, 256);
if (addToDesktop_)
Component::addToDesktop (getDesktopWindowStyleFlags());
@ -258,7 +250,10 @@ void ResizableWindow::setResizeLimits (const int newMinimumWidth,
const int newMaximumHeight) throw()
{
// if you've set up a custom constrainer then these settings won't have any effect..
jassert (constrainer == &defaultConstrainer);
jassert (constrainer == &defaultConstrainer || constrainer == 0);
if (constrainer == 0)
setConstrainer (&defaultConstrainer);
defaultConstrainer.setSizeLimits (newMinimumWidth, newMinimumHeight,
newMaximumWidth, newMaximumHeight);