sugar-toolkit-gtk3/shell/view/frame/overlaybox.py
Marco Pesenti Gritti 6971ddb9a4 Support for activity icons inside the bundle.
Patch by Gonzalo Odiard <godiard@gmail.com>
Modified by me to allow icon theme to override the bundle one.
2007-01-12 21:35:53 +01:00

19 lines
561 B
Python

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='theme: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()