From 2ae043c1fe63429c10120f9984a3451e959a695e Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Sun, 12 Aug 2007 23:17:37 +0000 Subject: Add option to use the same style values as on the XO. Useful to test/debug size issues, if you have a screen that can do 1600x1200. --- (limited to 'sugar') diff --git a/sugar/graphics/style.py b/sugar/graphics/style.py index a5186da..c0094b6 100644 --- a/sugar/graphics/style.py +++ b/sugar/graphics/style.py @@ -15,14 +15,20 @@ # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. +import os + import gtk import pango def _get_screen_dpi(): xft_dpi = gtk.settings_get_default().get_property('gtk-xft-dpi') - return float(xft_dpi / 1024) + return float(xft_dpi / 1024) def _compute_zoom_factor(): + if os.environ.has_key('SUGAR_XO_STYLE'): + if os.environ['SUGAR_XO_STYLE'] == 'yes': + return 1.0 + return gtk.gdk.screen_width() / 1200.0 def zoom(units): -- cgit v0.9.1