diff options
author | Marco Pesenti Gritti <mpg@redhat.com> | 2007-02-27 19:08:33 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <mpg@redhat.com> | 2007-02-27 19:08:33 (GMT) |
commit | b3452663bc3cda80bf83b45385027897574696a9 (patch) | |
tree | f71323f7205a9e4bb2ac847ccb1010d473d960ff /sugar/graphics | |
parent | b2f50f9da4ba41bf602295308abb3f469efa6810 (diff) |
Use a custom style to get rid of the damned window background
Diffstat (limited to 'sugar/graphics')
-rw-r--r-- | sugar/graphics/window.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/sugar/graphics/window.py b/sugar/graphics/window.py index 1ff1fdb..85cbc4e 100644 --- a/sugar/graphics/window.py +++ b/sugar/graphics/window.py @@ -1,18 +1,24 @@ import hippo import gtk +from sugar.graphics import color + +class _Style(gtk.Style): + __gtype_name__ = 'SugarCanvasStyle' + def __init__(self): + gtk.Style.__init__(self) + + def do_set_background(self, window, state): + window.set_back_pixmap(None, False) + class Window(gtk.Window): def __init__(self, window_type=gtk.WINDOW_TOPLEVEL): gtk.Window.__init__(self, window_type) self._canvas = hippo.Canvas() + self._canvas.set_style(_Style()) self.add(self._canvas) self._canvas.show() - self._canvas.connect_after('realize', self._window_realize_cb) - def set_root(self, root): self._canvas.set_root(root) - - def _window_realize_cb(self, canvas): - canvas.window.set_back_pixmap(None, False) |