diff options
author | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2007-03-15 18:19:38 (GMT) |
---|---|---|
committer | Tomeu Vizoso <tomeu@tomeuvizoso.net> | 2007-03-15 18:19:38 (GMT) |
commit | d001c70443007ef9a66ee89ab5c12f2519d409ac (patch) | |
tree | ed468a1edf49809054538d5aead53c9e42e9c38b | |
parent | 9f5d642591ae21ce328b1ab322795352e0d85aaa (diff) |
Tweaked sizes of home xo icon, donut radius and device icons.
-rw-r--r-- | shell/view/devices/battery.py | 3 | ||||
-rw-r--r-- | shell/view/devices/wirelessnetwork.py | 3 | ||||
-rw-r--r-- | shell/view/home/HomeBox.py | 6 | ||||
-rw-r--r-- | sugar/graphics/units.py | 2 |
4 files changed, 8 insertions, 6 deletions
diff --git a/shell/view/devices/battery.py b/shell/view/devices/battery.py index 56e3ffb..2047331 100644 --- a/shell/view/devices/battery.py +++ b/shell/view/devices/battery.py @@ -1,10 +1,11 @@ from sugar.graphics import canvasicon +from sugar.graphics import units _ICON_NAME = 'device-battery' class DeviceView(canvasicon.CanvasIcon): def __init__(self, model): - canvasicon.CanvasIcon.__init__(self) + canvasicon.CanvasIcon.__init__(self, scale=units.MEDIUM_ICON_SCALE) self._model = model model.connect('notify::level', self._level_changed_cb) diff --git a/shell/view/devices/wirelessnetwork.py b/shell/view/devices/wirelessnetwork.py index d18fea0..2acb231 100644 --- a/shell/view/devices/wirelessnetwork.py +++ b/shell/view/devices/wirelessnetwork.py @@ -17,6 +17,7 @@ from sugar.graphics import canvasicon from sugar.graphics import color +from sugar.graphics import units from model.devices import wirelessnetwork from view.pulsingicon import PulsingIcon @@ -24,7 +25,7 @@ _ICON_NAME = 'device-network-wireless' class DeviceView(PulsingIcon): def __init__(self, model): - PulsingIcon.__init__(self) + PulsingIcon.__init__(self, scale=units.MEDIUM_ICON_SCALE) self._model = model model.connect('notify::name', self._name_changed_cb) diff --git a/shell/view/home/HomeBox.py b/shell/view/home/HomeBox.py index e2483d2..86449c6 100644 --- a/shell/view/home/HomeBox.py +++ b/shell/view/home/HomeBox.py @@ -34,8 +34,8 @@ class HomeBox(hippo.CanvasBox, hippo.CanvasItem): hippo.CanvasBox.__init__(self, background_color=0xe2e2e2ff, yalign=2) self._donut = ActivitiesDonut(shell, - box_width=units.grid_to_pixels(7), - box_height=units.grid_to_pixels(7)) + box_width=units.grid_to_pixels(6), + box_height=units.grid_to_pixels(6)) self.append(self._donut) self._my_icon = MyIcon(units.XLARGE_ICON_SCALE) @@ -93,7 +93,7 @@ class HomeBox(hippo.CanvasBox, hippo.CanvasItem): i = 0 for icon in self._device_icons.values(): angle = 2 * math.pi / len(self._device_icons) * i + math.pi / 2 - radius = units.grid_to_pixels(5) + radius = units.grid_to_pixels(4) [icon_width, icon_height] = icon.get_allocation() diff --git a/sugar/graphics/units.py b/sugar/graphics/units.py index 8581aae..2417255 100644 --- a/sugar/graphics/units.py +++ b/sugar/graphics/units.py @@ -81,7 +81,7 @@ STANDARD_ICON_SCALE = 1.0 * _dpi_factor * _zoom_factor SMALL_ICON_SCALE = 0.5 * _dpi_factor * _zoom_factor 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 +XLARGE_ICON_SCALE = 2.75 * _dpi_factor * _zoom_factor def points_to_device(points): return int(points * _zoom_factor) |