gtkbase.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:gui-o-matic 作者: mailpile 项目源码 文件源码
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?
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号