dialog.py 文件源码

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

项目:poseidon 作者: sidus-dev 项目源码 文件源码
def fix_dialog(self, dialog, text):

        if text: dialog.set_markup(text)
        dialog.set_modal(True)

        headerbar = dialog.get_header_bar()

        if headerbar:

            # This is a temporary fix for the duplicate buttons bug
            # in 'Gtk.AboutDialog' when 'use_header_bar' property is set.

            if type(dialog) == Gtk.AboutDialog:
                for i in headerbar:
                    if type(i) != Gtk.StackSwitcher: i.destroy()

        box = dialog.get_content_area()
        box.set_border_width(10)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号