Improve stylesheet loading
This commit is contained in:
@@ -10,7 +10,7 @@ class ActivityItem(CanvasIcon):
|
||||
def __init__(self, activity):
|
||||
icon_name = activity.get_icon()
|
||||
CanvasIcon.__init__(self, icon_name=icon_name)
|
||||
style.apply_stylesheet(self, 'frame-activity-icon')
|
||||
style.apply_stylesheet(self, 'frame.ActivityIcon')
|
||||
self._activity = activity
|
||||
|
||||
def get_bundle_id(self):
|
||||
|
||||
@@ -15,11 +15,11 @@ class ActivityMenu(Menu):
|
||||
Menu.__init__(self, activity_host.get_title())
|
||||
|
||||
icon = CanvasIcon(icon_name='stock-share-mesh')
|
||||
style.apply_stylesheet(icon, 'menu-action-icon')
|
||||
style.apply_stylesheet(icon, 'menu.ActionIcon')
|
||||
self.add_action(icon, ActivityMenu.ACTION_SHARE)
|
||||
|
||||
icon = CanvasIcon(icon_name='stock-close')
|
||||
style.apply_stylesheet(icon, 'menu-action-icon')
|
||||
style.apply_stylesheet(icon, 'menu.ActionIcon')
|
||||
self.add_action(icon, ActivityMenu.ACTION_CLOSE)
|
||||
|
||||
class ActivityIcon(MenuIcon):
|
||||
@@ -61,22 +61,22 @@ class ZoomBox(hippo.CanvasBox):
|
||||
self._activity_icon = None
|
||||
|
||||
icon = CanvasIcon(icon_name='stock-zoom-mesh')
|
||||
style.apply_stylesheet(icon, 'frame-zoom-icon')
|
||||
style.apply_stylesheet(icon, 'frame.ZoomIcon')
|
||||
icon.connect('activated', self._level_clicked_cb, sugar.ZOOM_MESH)
|
||||
self.append(icon)
|
||||
|
||||
icon = CanvasIcon(icon_name='stock-zoom-friends')
|
||||
style.apply_stylesheet(icon, 'frame-zoom-icon')
|
||||
style.apply_stylesheet(icon, 'frame.ZoomIcon')
|
||||
icon.connect('activated', self._level_clicked_cb, sugar.ZOOM_FRIENDS)
|
||||
self.append(icon)
|
||||
|
||||
icon = CanvasIcon(icon_name='stock-zoom-home')
|
||||
style.apply_stylesheet(icon, 'frame-zoom-icon')
|
||||
style.apply_stylesheet(icon, 'frame.ZoomIcon')
|
||||
icon.connect('activated', self._level_clicked_cb, sugar.ZOOM_HOME)
|
||||
self.append(icon)
|
||||
|
||||
icon = CanvasIcon(icon_name='stock-zoom-activity')
|
||||
style.apply_stylesheet(icon, 'frame-zoom-icon')
|
||||
style.apply_stylesheet(icon, 'frame.ZoomIcon')
|
||||
icon.connect('activated', self._level_clicked_cb, sugar.ZOOM_ACTIVITY)
|
||||
self.append(icon)
|
||||
|
||||
@@ -89,7 +89,7 @@ class ZoomBox(hippo.CanvasBox):
|
||||
|
||||
if activity:
|
||||
icon = ActivityIcon(self._shell, self._menu_shell, activity)
|
||||
style.apply_stylesheet(icon, 'frame-zoom-icon')
|
||||
style.apply_stylesheet(icon, 'frame.ZoomIcon')
|
||||
self.append(icon, 0)
|
||||
self._activity_icon = icon
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user