Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sugar/graphics/font.py4
-rw-r--r--sugar/graphics/units.py7
-rwxr-xr-xtools/build-snapshot.sh2
3 files changed, 8 insertions, 5 deletions
diff --git a/sugar/graphics/font.py b/sugar/graphics/font.py
index bf53269..6750f87 100644
--- a/sugar/graphics/font.py
+++ b/sugar/graphics/font.py
@@ -3,8 +3,8 @@ import pango
from sugar.graphics import units
_system_fonts = {
- 'default' : 'Bitstream Vera Sans %dpx' % units.points_to_pixels(9),
- 'default-bold' : 'Bitstream Vera Sans bold %dpx' % units.points_to_pixels(9)
+ 'default' : 'Bitstream Vera Sans %d' % units.points_to_device(9),
+ 'default-bold' : 'Bitstream Vera Sans bold %d' % units.points_to_device(9)
}
class Font(object):
diff --git a/sugar/graphics/units.py b/sugar/graphics/units.py
index ec3958e..2ec3dd5 100644
--- a/sugar/graphics/units.py
+++ b/sugar/graphics/units.py
@@ -64,7 +64,7 @@ import gtk
import _sugar
_MAX_ZOOM_FACTOR = 1.5
-_ZOOM_CONSTANT = 600.0
+_ZOOM_CONSTANT = 800.0
def _compute_zoom_factor():
screen_width = gtk.gdk.screen_width()
@@ -83,8 +83,11 @@ MEDIUM_ICON_SCALE = 1.5 * _dpi_factor * _zoom_factor
LARGE_ICON_SCALE = 2.0 * _dpi_factor * _zoom_factor
XLARGE_ICON_SCALE = 3.0 * _dpi_factor * _zoom_factor
+def points_to_device(points):
+ return int(points * _zoom_factor)
+
def points_to_pixels(points):
- return int(points * _screen_dpi * 72.0 * _zoom_factor)
+ return int(points * _screen_dpi / 72.0 * _zoom_factor)
def grid_to_pixels(units):
return int(units * 75.0 * _dpi_factor * _zoom_factor)
diff --git a/tools/build-snapshot.sh b/tools/build-snapshot.sh
index 0fcb2bc..b5d9b8a 100755
--- a/tools/build-snapshot.sh
+++ b/tools/build-snapshot.sh
@@ -1,6 +1,6 @@
VERSION=0.63
DATE=`date +%Y%m%d`
-RELEASE=2.27
+RELEASE=2.29
TARBALL=sugar-$VERSION-$RELEASE.${DATE}git.tar.bz2
rm sugar-$VERSION.tar.bz2