headerbar.py 文件源码

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

项目:Gnome-Authenticator 作者: bil-elmoussaoui 项目源码 文件源码
def generate_left_box(self):
        left_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)

        remove_icon = Gio.ThemedIcon(name="user-trash-symbolic")
        remove_image = Gtk.Image.new_from_gicon(
            remove_icon, Gtk.IconSize.BUTTON)
        self.remove_button.set_tooltip_text(_("Remove selected accounts"))
        self.remove_button.set_image(remove_image)
        self.remove_button.set_sensitive(False)

        add_icon = Gio.ThemedIcon(name="list-add-symbolic")
        add_image = Gtk.Image.new_from_gicon(add_icon, Gtk.IconSize.BUTTON)
        self.add_button.set_tooltip_text(_("Add a new account"))
        self.add_button.set_image(add_image)

        lock_icon = Gio.ThemedIcon(name="changes-prevent-symbolic")
        lock_image = Gtk.Image.new_from_gicon(lock_icon, Gtk.IconSize.BUTTON)
        self.lock_button.set_tooltip_text(_("Lock the Application"))
        self.lock_button.set_image(lock_image)
        settings.connect('changed', self.bind_status)
        left_box.add(self.remove_button)
        left_box.add(self.add_button)
        left_box.add(self.lock_button)
        return left_box
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号