22 lines
450 B
Python
22 lines
450 B
Python
#!/usr/bin/env python3
|
|
|
|
import gi
|
|
gi.require_version('Gtk', '3.0')
|
|
from gi.repository import Gtk
|
|
|
|
|
|
class TitleText(Gtk.Label):
|
|
def __init__(self, text = 'mpd loading...'):
|
|
Gtk.Box.__init__(self)
|
|
|
|
self.set_size_request(256, 20)
|
|
self.set_name('text')
|
|
self.set_hexpand(True)
|
|
self.set_hexpand_set(True)
|
|
self.set_halign(Gtk.Align.CENTER)
|
|
self.set_text(text)
|
|
|
|
|
|
def update(self, text):
|
|
self.set_text(text)
|
|
return self |