From 8aa31a6095430d2dc36a39b4d0d1d3133e434c01 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Wed, 12 Sep 2007 16:01:21 +0000 Subject: Make the sizes of mesh icons match Eben spec. --- diff --git a/NEWS b/NEWS index d35e5c0..be8905a 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,4 @@ +* Make the sizes of mesh icons match Eben spec. (marco) * #3364: When joining an activity, pick up its sharing scope, so we don't try to re-share already shared activities in order to invite someone (smcv) 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): -- cgit v0.9.1