cdialog.py 文件源码

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

项目:kdialog 作者: HeaTTheatR 项目源码 文件源码
def __init__(self, **kvargs):
        super(CDialog, 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),
            background_normal=self.background_image_buttons[0],
            background_down=self.background_image_shadows[0],
            background_color=choice(self.background_color_buttons)
        )

        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)

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


问题


面经


文章

微信
公众号

扫码关注公众号