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()
评论列表
文章目录