Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2007-09-12 16:01:21 (GMT)
committer Marco Pesenti Gritti <mpg@redhat.com>2007-09-12 16:01:21 (GMT)
commit8aa31a6095430d2dc36a39b4d0d1d3133e434c01 (patch)
tree6872defe8507c348cd9f9651192471c2f8e4cbdb /shell
parentbc49fc425755bc148649ae0934e06eb76eb1125c (diff)
Make the sizes of mesh icons match Eben spec.
Diffstat (limited to 'shell')
-rw-r--r--shell/view/BuddyIcon.py6
-rw-r--r--shell/view/home/MeshBox.py12
2 files changed, 11 insertions, 7 deletions
diff --git a/shell/view/BuddyIcon.py b/shell/view/BuddyIcon.py
index 047035e..95365aa 100644
--- a/shell/view/BuddyIcon.py
+++ b/shell/view/BuddyIcon.py
@@ -16,12 +16,14 @@
from sugar.graphics.icon import CanvasIcon
from sugar.graphics.palette import Palette
+from sugar.graphics import style
+
from view.BuddyMenu import BuddyMenu
class BuddyIcon(CanvasIcon):
- def __init__(self, shell, buddy):
+ def __init__(self, shell, buddy, size=style.STANDARD_ICON_SIZE):
CanvasIcon.__init__(self, icon_name='computer-xo',
- xo_color=buddy.get_color())
+ xo_color=buddy.get_color(), size=size)
self._shell = shell
self._buddy = buddy
diff --git a/shell/view/home/MeshBox.py b/shell/view/home/MeshBox.py
index 117fcac..0567d76 100644
--- a/shell/view/home/MeshBox.py
+++ b/shell/view/home/MeshBox.py
@@ -46,7 +46,7 @@ _ICON_NAME = 'network-wireless'
class AccessPointView(PulsingIcon):
def __init__(self, model, mesh_device=None):
- PulsingIcon.__init__(self, size=style.MEDIUM_ICON_SIZE, cache=True)
+ PulsingIcon.__init__(self, size=style.STANDARD_ICON_SIZE, cache=True)
self._model = model
self._meshdev = mesh_device
self._disconnect_item = None
@@ -159,7 +159,7 @@ class MeshDeviceView(PulsingIcon):
if not channel in [1, 6, 11]:
raise ValueError("Invalid channel %d" % channel)
- PulsingIcon.__init__(self, size=style.MEDIUM_ICON_SIZE,
+ PulsingIcon.__init__(self, size=style.STANDARD_ICON_SIZE,
icon_name=_MESH_ICON_NAME, cache=True)
self._nm_device = nm_device
@@ -249,8 +249,9 @@ class ActivityView(hippo.CanvasBox):
self._layout = SnowflakeLayout()
self.set_layout(self._layout)
- self._icon = CanvasIcon(file_name=model.get_icon_name(), cache=True,
- xo_color=model.get_color(), box_width=80)
+ self._icon = CanvasIcon(file_name=model.get_icon_name(),
+ xo_color=model.get_color(), cache=True,
+ size=style.STANDARD_ICON_SIZE)
self._icon.connect('activated', self._clicked_cb)
self._icon.set_tooltip(self._model.activity.props.name)
self._layout.add_center(self._icon)
@@ -402,7 +403,8 @@ class MeshBox(hippo.CanvasBox):
else:
activity = self._activities[activity_model.get_id()]
- icon = BuddyIcon(self._shell, buddy_model)
+ icon = BuddyIcon(self._shell, buddy_model,
+ style.SMALL_ICON_SIZE)
activity.add_buddy_icon(buddy_model.get_key(), icon)
def _add_activity(self, activity_model):