You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by af...@apache.org on 2013/07/10 10:11:07 UTC
svn commit: r1501668 - /openoffice/trunk/main/vcl/unx/gtk/window/gtkframe.cxx
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 );
}