openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject svn commit: r1501668 - /openoffice/trunk/main/vcl/unx/gtk/window/gtkframe.cxx
Date Wed, 10 Jul 2013 08:11:07 GMT
Author: af
Date: Wed Jul 10 08:11:07 2013
New Revision: 1501668

URL: http://svn.apache.org/r1501668
Log:
122709: Set default size of application windows to 80% of the screen size.

Modified:
    openoffice/trunk/main/vcl/unx/gtk/window/gtkframe.cxx

Modified: openoffice/trunk/main/vcl/unx/gtk/window/gtkframe.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/vcl/unx/gtk/window/gtkframe.cxx?rev=1501668&r1=1501667&r2=1501668&view=diff
==============================================================================
--- openoffice/trunk/main/vcl/unx/gtk/window/gtkframe.cxx (original)
+++ openoffice/trunk/main/vcl/unx/gtk/window/gtkframe.cxx Wed Jul 10 08:11:07 2013
@@ -1244,19 +1244,31 @@ 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 );
 }
 



Mime
View raw message