summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk/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/gtk/window
parent02d4f6a2494621a17bb59d743ed499cce555839a (diff)
merge the 'holy default' default window sizes to a single place
Change-Id: I247a52cf547da268e5aa6f7c9fef000c598b661b
Diffstat (limited to 'vcl/unx/gtk/window')
-rw-r--r--vcl/unx/gtk/window/gtkframe.cxx22
1 files changed, 2 insertions, 20 deletions
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 398ece4c300a..6343f5b149f8 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -22,6 +22,7 @@
#include <unx/gtk/gtkinst.hxx>
#include <unx/gtk/gtkgdi.hxx>
#include <vcl/keycodes.hxx>
+#include <vcl/layout.hxx>
#include <unx/wmadaptor.hxx>
#include <unx/sm.hxx>
#include <unx/salbmp.h>
@@ -1534,26 +1535,7 @@ void GtkSalFrame::Center()
Size GtkSalFrame::calcDefaultSize()
{
- Size aScreenSize = getDisplay()->GetScreenSize( GetDisplayScreen() );
- long w = aScreenSize.Width();
- long h = aScreenSize.Height();
-
- // 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;
-
- return Size( w, h );
+ return bestmaxFrameSizeForScreenSize(getDisplay()->GetScreenSize(GetDisplayScreen()));
}
void GtkSalFrame::SetDefaultSize()