blob: e608889e8e3534a0ea6662e7964694225c4206c0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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)
|