vcl/unx/gtk/window/gtkframe.cxx |   36 ++++++++++++++++++++++++------------
 1 file changed, 24 insertions(+), 12 deletions(-)

New commits:
commit 99c3dd415f415126759a6332f78732f886f5a35c
Author: Andre Fischer <a...@apache.org>
Date:   Wed Jul 10 08:11:07 2013 +0000

    122709: Set default size of application windows to 80% of the screen size.

diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 5ca2a77..977d713 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -1244,18 +1244,30 @@ Size GtkSalFrame::calcDefaultSize()
     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.Height() >= 600 )
-        h = 550;
-    if( aScreenSize.Height() >= 768 )
-        h = 630;
-    if( aScreenSize.Height() >= 1024 )
-        h = 875;
+
+    if (true || aScreenSize.Width() <= 1024)
+    {
+        // For small screen use the old default values.  Original comment:
+        // 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.Height() >= 600 )
+            h = 550;
+        if( aScreenSize.Height() >= 768 )
+            h = 630;
+        if( aScreenSize.Height() >= 1024 )
+            h = 875;
+    }
+    else
+    {
+        // Use the same size calculation as on Mac OSX: 80% of width
+        // and height.
+        w = static_cast<long>(aScreenSize.Width() * 0.8);
+        h = static_cast<long>(aScreenSize.Height() * 0.8);
+    }
 
     return Size( w, h );
 }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to