diff --git a/shell/view/home/FriendsBox.py b/shell/view/home/FriendsBox.py index a0c467c6..c0178dd1 100644 --- a/shell/view/home/FriendsBox.py +++ b/shell/view/home/FriendsBox.py @@ -20,7 +20,7 @@ import hippo import gobject from sugar.graphics.spreadbox import SpreadBox -from sugar.graphics import style +from sugar.graphics import units from view.home.MyIcon import MyIcon from view.home.FriendView import FriendView @@ -33,8 +33,7 @@ class FriendsBox(SpreadBox, hippo.CanvasItem): self._menu_shell = menu_shell self._friends = {} - self._my_icon = MyIcon() - style.apply_stylesheet(self._my_icon, 'friends.MyIcon') + self._my_icon = MyIcon(units.LARGE_ICON_SCALE) self.append(self._my_icon, hippo.PACK_FIXED) friends = self._shell.get_model().get_friends() diff --git a/shell/view/home/HomeBox.py b/shell/view/home/HomeBox.py index 7fef59ac..bdc66210 100644 --- a/shell/view/home/HomeBox.py +++ b/shell/view/home/HomeBox.py @@ -19,7 +19,6 @@ import hippo from view.home.activitiesdonut import ActivitiesDonut from view.home.MyIcon import MyIcon from model.ShellModel import ShellModel -from sugar.graphics import style from sugar.graphics import units from sugar.graphics.iconcolor import IconColor @@ -34,8 +33,7 @@ class HomeBox(hippo.CanvasBox, hippo.CanvasItem): box_height=units.grid_to_pixels(7)) self.append(self._donut) - self._my_icon = MyIcon() - style.apply_stylesheet(self._my_icon, 'home.MyIcon') + self._my_icon = MyIcon(units.XLARGE_ICON_SCALE) self.append(self._my_icon, hippo.PACK_FIXED) shell.get_model().connect('notify::state', diff --git a/shell/view/home/MyIcon.py b/shell/view/home/MyIcon.py index 94d919c0..6fa36b60 100644 --- a/shell/view/home/MyIcon.py +++ b/shell/view/home/MyIcon.py @@ -18,6 +18,7 @@ from sugar.graphics.canvasicon import CanvasIcon from sugar import profile class MyIcon(CanvasIcon): - def __init__(self): - CanvasIcon.__init__(self, icon_name='theme:stock-buddy', - color=profile.get_color()) + def __init__(self, scale): + CanvasIcon.__init__(self, scale=scale, + icon_name='theme:stock-buddy', + color=profile.get_color()) diff --git a/shell/view/stylesheet.py b/shell/view/stylesheet.py index 92d5dfdf..6e983f32 100644 --- a/shell/view/stylesheet.py +++ b/shell/view/stylesheet.py @@ -35,18 +35,10 @@ frame_BuddyIcon = { 'scale' : style.standard_icon_scale } -home_MyIcon = { - 'scale' : style.xlarge_icon_scale -} - ring_ActivityIcon = { 'scale' : style.medium_icon_scale } -friends_MyIcon = { - 'scale' : style.large_icon_scale -} - friends_FriendIcon = { 'scale' : style.large_icon_scale }