selectcolor.py 文件源码

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

项目:HeaTDV4A 作者: HeaTTheatR 项目源码 文件源码
def __init__(self, **kvargs):
        super(SelectColor, self).__init__(**kvargs)

        box = BoxLayout(orientation="vertical")
        select_color = ColorPicker(hex_color=self.default_color)
        button_select = Button(text=self.text_button_ok, size_hint=(1, .1))

        box.add_widget(select_color)
        box.add_widget(Widget(size_hint=(None, .02)))
        box.add_widget(SettingSpacer())
        box.add_widget(Widget(size_hint=(None, .02)))
        box.add_widget(button_select)

        self.body = Popup(title=self.title, content=box, size_hint=self.size,
                          background=self.background_image)
        self.body.bind(on_dismiss=self.dismiss_callback)

        button_select.bind(on_press=lambda color: self.select_callback(
            select_color.hex_color), on_release=lambda *args: self.body.dismiss())
        self.body.open()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号