def _main_window_default_style(self):
wcfg = self.config['main_window']
vbox = gtk.VBox(False, 5)
vbox.set_border_width(5)
# TODO: Allow user to configure alignment of message, padding?
lbl = gtk.Label()
lbl.set_markup(wcfg.get('message', ''))
lbl.set_alignment(0.5, 0.5)
if wcfg.get('image'):
self._set_background_image(vbox, wcfg.get('image'))
button_box = gtk.HBox(False, 5)
self._main_window_indicator(vbox, button_box)
self._main_window_add_actions(button_box)
vbox.pack_start(lbl, True, True)
vbox.pack_end(button_box, False, True)
self.main_window['window'].add(vbox)
self.main_window.update({
'vbox': vbox,
'label': lbl,
'buttons': button_box})
# TODO: Add other window styles?
评论列表
文章目录