Refactor button a bit to support different sizes. Use it for the overlaybox.
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user