[PATCH] Reduce default emulator resolution to 1024x768
Bernie Innocenti
bernie at codewiz.org
Tue Feb 3 14:04:11 EST 2009
This is useful to shake layout bugs in activities, and test against
smaller, more common display sizes for netbooks and desktops that we
are targeting with SoaS and packages for popular Linux distributions.
Activity authors who still want to test with a display size matching
the XO-1 can still do so with "sugar-emulator -i 1200x900".
---
bin/sugar-emulator | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/bin/sugar-emulator b/bin/sugar-emulator
index 8c0aa8e..84cfc04 100644
--- a/bin/sugar-emulator
+++ b/bin/sugar-emulator
@@ -15,6 +15,9 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
02110-1301 USA
+DEFAULT_WIDTH = 1024
+DEFAULT_HEIGHT = 768
+
import os
import random
import subprocess
@@ -34,11 +37,12 @@ def _run_xephyr(display, dpi, dimensions):
if dimensions is not None:
cmd.append('-screen')
cmd.append(dimensions)
- elif gtk.gdk.screen_width() < 1200 or gtk.gdk.screen_height() < 900:
+ elif gtk.gdk.screen_width() < DEFAULT_WIDTH or \
+ gtk.gdk.screen_height() < DEFAULT_HEIGHT:
cmd.append('-fullscreen')
else:
cmd.append('-screen')
- cmd.append('%dx%d' % (1200, 900))
+ cmd.append('%dx%d' % (DEFAULT_WIDTH, DEFAULT_HEIGHT))
if dpi is None:
dpi = gtk.settings_get_default().get_property('gtk-xft-dpi')
/ 1024
--
1.6.0.6
--
// Bernie Innocenti - http://www.codewiz.org/
\X/ Sugar Labs - http://www.sugarlabs.org/
More information about the Sugar-devel
mailing list