Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Area.py
diff options
context:
space:
mode:
authorManuel QuiƱones <manuq@laptop.org>2011-08-15 16:53:53 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2011-08-17 19:47:40 (GMT)
commita3602b6f37a65908515b124664fe334ba51feb90 (patch)
tree6e8acbd7e724a690657432ffc1d447c1248eff5b /Area.py
parent6a589ff0f0770a668fd5f3ea796b0a787db6be9c (diff)
Initial stamp size set based on the display's DPI
Fixes SL #2966 . Signed-off-by: Manuel QuiƱones <manuq@laptop.org>
Diffstat (limited to 'Area.py')
-rw-r--r--Area.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/Area.py b/Area.py
index 2e40d00..d953005 100644
--- a/Area.py
+++ b/Area.py
@@ -72,6 +72,8 @@ import pango
from fill import fill
from Desenho import Desenho
from urlparse import urlparse
+from sugar.graphics.style import zoom
+
##Tools and events manipulation are handle with this class.
@@ -139,7 +141,7 @@ class Area(gtk.DrawingArea):
self.tool = {
'name': 'pencil',
'line size': 4,
- 'stamp size': 20,
+ 'stamp size': self._get_stamp_size(),
'fill color': None,
'stroke color': None,
'line shape': 'circle',
@@ -187,6 +189,10 @@ class Area(gtk.DrawingArea):
self.x_cursor = 0
self.y_cursor = 0
+ def _get_stamp_size(self):
+ """Set the stamp initial size, based on the display DPI."""
+ return zoom(44)
+
def setup(self, width, height):
"""Configure the Area object."""