Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar/graphics/objectchooser.py
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2007-07-31 13:02:50 (GMT)
committer Marco Pesenti Gritti <mpg@redhat.com>2007-07-31 13:02:50 (GMT)
commitf2eca57d132d5e6605210ee2753a12216cf870cb (patch)
tree3b0c1b8a4bb5b7269364f99dba9c4edc87038cd4 /sugar/graphics/objectchooser.py
parent445a79231d1dc1cd97e1acc453deaa7a2f0266da (diff)
More units cleanups
Diffstat (limited to 'sugar/graphics/objectchooser.py')
-rw-r--r--sugar/graphics/objectchooser.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/sugar/graphics/objectchooser.py b/sugar/graphics/objectchooser.py
index a878ac8..c75cec0 100644
--- a/sugar/graphics/objectchooser.py
+++ b/sugar/graphics/objectchooser.py
@@ -25,7 +25,6 @@ from sugar.graphics.frame import Frame
from sugar.activity.bundle import Bundle
from sugar.date import Date
from sugar.graphics import style
-from sugar.graphics import units
from sugar.graphics.canvasicon import CanvasIcon
from sugar.graphics.xocolor import XoColor
from sugar.datastore import datastore
@@ -43,8 +42,8 @@ class ObjectChooser(gtk.Dialog):
self._box = hippo.CanvasBox()
self._box.props.background_color = style.COLOR_PANEL_GREY.get_int()
- self._box.props.spacing = units.points_to_pixels(5)
- self._box.props.padding = units.points_to_pixels(5)
+ self._box.props.spacing = style.DEFAULT_SPACING
+ self._box.props.padding = style.DEFAULT_SPACING
canvas = hippo.Canvas()
canvas.set_root(self._box)
@@ -97,13 +96,13 @@ class ObjectChooser(gtk.Dialog):
return None
class CollapsedEntry(Frame):
- _DATE_COL_WIDTH = units.points_to_pixels(75)
- _BUDDIES_COL_WIDTH = units.points_to_pixels(30)
+ _DATE_COL_WIDTH = style.zoom(100)
+ _BUDDIES_COL_WIDTH = style.zoom(50)
def __init__(self, jobject):
Frame.__init__(self)
- self.props.box_height = units.grid_to_pixels(1)
- self.props.spacing = units.points_to_pixels(5)
+ self.props.box_height = style.zoom(75)
+ self.props.spacing = style.DEFAULT_SPACING
self.props.border_color = style.COLOR_BLACK.get_int()
self.props.background_color = style.COLOR_PANEL_GREY.get_int()
@@ -117,7 +116,7 @@ class CollapsedEntry(Frame):
self.append(date)
icon = CanvasIcon(icon_name=self._get_icon_name(),
- box_width=units.grid_to_pixels(1))
+ box_width=style.zoom(75))
if self.jobject.metadata.has_key('icon-color'):
icon.props.xo_color = XoColor(self.jobject.metadata['icon-color'])