summaryrefslogtreecommitdiff
path: root/vcl/unx/generic/window
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-01-14 10:29:35 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-01-14 16:04:17 +0000
commitd652af7d071bb5e5c3f7592d6dc7e7c400e711d3 (patch)
treeb30375691fdfc2bd8171c7666eeb87cceae15b10 /vcl/unx/generic/window
parent02d4f6a2494621a17bb59d743ed499cce555839a (diff)
merge the 'holy default' default window sizes to a single place
Change-Id: I247a52cf547da268e5aa6f7c9fef000c598b661b
Diffstat (limited to 'vcl/unx/generic/window')
-rw-r--r--vcl/unx/generic/window/salframe.cxx18
1 files changed, 4 insertions, 14 deletions
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index 67ce56e08992..a30c32f145b6 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -31,6 +31,7 @@
#include "vcl/floatwin.hxx"
#include "vcl/svapp.hxx"
#include "vcl/keycodes.hxx"
+#include "vcl/layout.hxx"
#include "vcl/printerinfomanager.hxx"
#include "vcl/settings.hxx"
@@ -331,20 +332,9 @@ void X11SalFrame::Init( sal_uLong nSalFrameStyle, SalX11Screen nXScreen, SystemP
if( nSalFrameStyle & SAL_FRAME_STYLE_SIZEABLE &&
nSalFrameStyle & SAL_FRAME_STYLE_MOVEABLE )
{
- // fill in holy default values brought to us by product management
- if( aScreenSize.Width() >= 800 )
- w = 785;
- if( aScreenSize.Width() >= 1024 )
- w = 920;
- if( aScreenSize.Width() >= 1280 )
- w = 1050;
-
- if( aScreenSize.Height() >= 600 )
- h = 550;
- if( aScreenSize.Height() >= 768 )
- h = 630;
- if( aScreenSize.Height() >= 1024 )
- h = 875;
+ Size aBestFitSize(bestmaxFrameSizeForScreenSize(aScreenSize));
+ w = aBestFitSize.Width();
+ h = aBestFitSize.Height();
}
if( ! mpParent )
{