gui_toolbar.py 文件源码

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

项目:ghetto_omr 作者: pohzhiee 项目源码 文件源码
def tool_btn_toggled(self,button):
        tool_dict = {"browser": tool_func.func0,
                     "alienarena": tool_func.func1,
                     "live": tool_func.func2,
                     "cs-network": tool_func.func3
                     }
        if button.get_active():
            state = "on"
            Gtk.StyleContext.add_class(button.get_style_context(), "toggleasd")
            btn_func_exist = button.name in tool_dict
            if btn_func_exist:
                tool_dict[button.name](button.name)
        else:
            state = "off"
            Gtk.StyleContext.remove_class(button.get_style_context(), "toggleasd")

        # print(button.name, "has been turned", state)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号