From 958f0fcb437be76c2b420e84b138c944ae47847a Mon Sep 17 00:00:00 2001 From: Gerard J. Cerchio Date: Wed, 28 Nov 2007 00:54:37 +0000 Subject: Initial import --- (limited to 'infopanel.py') diff --git a/infopanel.py b/infopanel.py new file mode 100755 index 0000000..e608889 --- /dev/null +++ b/infopanel.py @@ -0,0 +1,20 @@ +import hippo +import pango +from sugar.graphics import style + +class InfoPanel(hippo.CanvasBox): + def __init__(self): + hippo.CanvasBox.__init__(self, spacing=4, padding=5, + orientation=hippo.ORIENTATION_VERTICAL) + self.status_box = hippo.CanvasBox(spacing=4, padding=5, + orientation=hippo.ORIENTATION_VERTICAL) + self.append(self.status_box) + + def show(self, text): + textwidget = hippo.CanvasText(text=text, + font_desc=pango.FontDescription('Sans 16'), + color=style.COLOR_WHITE.get_int(), + xalign=hippo.ALIGNMENT_CENTER) + self.status_box.remove_all() + self.status_box.append(textwidget) + -- cgit v0.9.1