Add the overlay icon on the frame
parent
77e0d33c3d
commit
2aa69e7199
@ -0,0 +1,18 @@
|
||||
import hippo
|
||||
|
||||
from sugar.graphics import style
|
||||
from sugar.graphics.canvasicon import CanvasIcon
|
||||
|
||||
class OverlayBox(hippo.CanvasBox):
|
||||
def __init__(self, shell):
|
||||
hippo.CanvasBox.__init__(self, orientation=hippo.ORIENTATION_HORIZONTAL)
|
||||
|
||||
self._shell = shell
|
||||
|
||||
icon = CanvasIcon(icon_name='stock-chat')
|
||||
style.apply_stylesheet(icon, 'frame.OverlayIcon')
|
||||
icon.connect('activated', self._overlay_clicked_cb)
|
||||
self.append(icon)
|
||||
|
||||
def _overlay_clicked_cb(self, item):
|
||||
self._shell.toggle_chat_visibility()
|
Loading…
Reference in New Issue