From d652af7d071bb5e5c3f7592d6dc7e7c400e711d3 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 14 Jan 2013 10:29:35 +0000 Subject: merge the 'holy default' default window sizes to a single place Change-Id: I247a52cf547da268e5aa6f7c9fef000c598b661b --- vcl/unx/generic/window/salframe.cxx | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'vcl/unx/generic') 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 ) { -- cgit