Refactor button a bit to support different sizes. Use it for the overlaybox.

This commit is contained in:
Marco Pesenti Gritti
2007-02-16 15:24:02 +01:00
parent 086a8e90eb
commit c9b103dfef
5 changed files with 41 additions and 26 deletions
+2 -4
View File
@@ -1,7 +1,6 @@
import hippo
from sugar.graphics import style
from sugar.graphics.canvasicon import CanvasIcon
from sugar.graphics.button import Button
class OverlayBox(hippo.CanvasBox):
def __init__(self, shell):
@@ -9,8 +8,7 @@ class OverlayBox(hippo.CanvasBox):
self._shell = shell
icon = CanvasIcon(icon_name='theme:stock-chat')
style.apply_stylesheet(icon, 'frame.OverlayIcon')
icon = Button(icon_name='theme:stock-chat')
icon.connect('activated', self._overlay_clicked_cb)
self.append(icon)
-6
View File
@@ -29,12 +29,6 @@ frame_ActivityIcon = {
'scale' : style.standard_icon_scale
}
frame_OverlayIcon = {
'box-width' : grid.dimension(1),
'box-height' : grid.dimension(1),
'scale' : style.standard_icon_scale
}
frame_ZoomIcon = {
'box-width' : grid.dimension(1),
'box-height' : grid.dimension(1),