Make CanvasIcon use IconBuffer. Change the API to use
a separate property for icon_name and file_name.
This commit is contained in:
@@ -28,9 +28,9 @@ from frameinvoker import FrameCanvasInvoker
|
||||
|
||||
class ActivityButton(IconButton):
|
||||
def __init__(self, activity_info):
|
||||
IconButton.__init__(self, icon_name=activity_info.icon,
|
||||
stroke_color=style.COLOR_WHITE,
|
||||
fill_color=style.COLOR_TRANSPARENT)
|
||||
IconButton.__init__(self, file_name=activity_info.icon,
|
||||
stroke_color=style.COLOR_WHITE.get_svg(),
|
||||
fill_color=style.COLOR_TRANSPARENT.get_svg())
|
||||
|
||||
palette = Palette(activity_info.name)
|
||||
palette.props.invoker = FrameCanvasInvoker(self)
|
||||
|
||||
@@ -30,7 +30,7 @@ class ZoomBox(hippo.CanvasBox):
|
||||
|
||||
self._shell = shell
|
||||
|
||||
icon = IconButton(icon_name='theme:zoom-mesh')
|
||||
icon = IconButton(icon_name='zoom-mesh')
|
||||
icon.connect('activated',
|
||||
self._level_clicked_cb,
|
||||
ShellModel.ZOOM_MESH)
|
||||
@@ -41,7 +41,7 @@ class ZoomBox(hippo.CanvasBox):
|
||||
palette.set_group_id('frame')
|
||||
icon.set_palette(palette)
|
||||
|
||||
icon = IconButton(icon_name='theme:zoom-friends')
|
||||
icon = IconButton(icon_name='zoom-friends')
|
||||
icon.connect('activated',
|
||||
self._level_clicked_cb,
|
||||
ShellModel.ZOOM_FRIENDS)
|
||||
@@ -52,7 +52,7 @@ class ZoomBox(hippo.CanvasBox):
|
||||
palette.set_group_id('frame')
|
||||
icon.set_palette(palette)
|
||||
|
||||
icon = IconButton(icon_name='theme:zoom-home')
|
||||
icon = IconButton(icon_name='zoom-home')
|
||||
icon.connect('activated',
|
||||
self._level_clicked_cb,
|
||||
ShellModel.ZOOM_HOME)
|
||||
@@ -63,7 +63,7 @@ class ZoomBox(hippo.CanvasBox):
|
||||
palette.set_group_id('frame')
|
||||
icon.set_palette(palette)
|
||||
|
||||
icon = IconButton(icon_name='theme:zoom-activity')
|
||||
icon = IconButton(icon_name='zoom-activity')
|
||||
icon.connect('activated',
|
||||
self._level_clicked_cb,
|
||||
ShellModel.ZOOM_ACTIVITY)
|
||||
|
||||
Reference in New Issue
Block a user