From af0a6793f3ba154bb115d0279ad3394e70776efb Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Fri, 16 Feb 2007 15:31:27 +0100 Subject: [PATCH] Use Button in the zoom box --- shell/view/frame/ZoomBox.py | 14 +++++--------- shell/view/stylesheet.py | 6 ------ 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/shell/view/frame/ZoomBox.py b/shell/view/frame/ZoomBox.py index fabcce9c..6aeec64c 100644 --- a/shell/view/frame/ZoomBox.py +++ b/shell/view/frame/ZoomBox.py @@ -22,7 +22,7 @@ from sugar.graphics.canvasicon import CanvasIcon from sugar.graphics.menuicon import MenuIcon from sugar.graphics.menu import Menu from sugar.graphics.iconcolor import IconColor -from sugar.graphics import style +from sugar.graphics.button import Button import sugar class ActivityMenu(Menu): @@ -84,23 +84,19 @@ class ZoomBox(hippo.CanvasBox): self._menu_shell = menu_shell self._activity_icon = None - icon = CanvasIcon(icon_name='theme:stock-zoom-mesh') - style.apply_stylesheet(icon, 'frame.ZoomIcon') + icon = Button(icon_name='theme:stock-zoom-mesh') icon.connect('activated', self._level_clicked_cb, sugar.ZOOM_MESH) self.append(icon) - icon = CanvasIcon(icon_name='theme:stock-zoom-friends') - style.apply_stylesheet(icon, 'frame.ZoomIcon') + icon = Button(icon_name='theme:stock-zoom-friends') icon.connect('activated', self._level_clicked_cb, sugar.ZOOM_FRIENDS) self.append(icon) - icon = CanvasIcon(icon_name='theme:stock-zoom-home') - style.apply_stylesheet(icon, 'frame.ZoomIcon') + icon = Button(icon_name='theme:stock-zoom-home') icon.connect('activated', self._level_clicked_cb, sugar.ZOOM_HOME) self.append(icon) - icon = CanvasIcon(icon_name='theme:stock-zoom-activity') - style.apply_stylesheet(icon, 'frame.ZoomIcon') + icon = Button(icon_name='theme:stock-zoom-activity') icon.connect('activated', self._level_clicked_cb, sugar.ZOOM_ACTIVITY) self.append(icon) diff --git a/shell/view/stylesheet.py b/shell/view/stylesheet.py index 99be593f..92d5dfdf 100644 --- a/shell/view/stylesheet.py +++ b/shell/view/stylesheet.py @@ -29,12 +29,6 @@ frame_ActivityIcon = { 'scale' : style.standard_icon_scale } -frame_ZoomIcon = { - 'box-width' : grid.dimension(1), - 'box-height' : grid.dimension(1), - 'scale' : style.standard_icon_scale -} - frame_BuddyIcon = { 'box-width' : grid.dimension(1), 'box-height' : grid.dimension(1),