def _on_select_color(self, instance):
        def color_selected(instance, c):
            self.alertaction.color_rgb = [c[0], c[1], c[2], 1.0]
            self.ids.led_color.color = [c[0], c[1], c[2], 1.0]
            popup.dismiss()

        c = self.alertaction.color_rgb
        content = ColorPickerView(color=[c[0], c[1], c[2], 1.0])
        content.bind(on_color_selected=color_selected)
        popup = Popup(title="Select Color", content=content, size_hint=(0.4, 0.6))
        popup.open()
Exemplo n.º 2
0
    def _on_select_color(self, instance):
        def color_selected(instance, c):
            self.alertaction.color_rgb = [c[0], c[1], c[2], 1.0]
            self.ids.led_color.color = [c[0], c[1], c[2], 1.0]
            popup.dismiss()

        c = self.alertaction.color_rgb
        content = ColorPickerView(color=[c[0], c[1], c[2], 1.0])
        content.bind(on_color_selected=color_selected)
        popup = Popup(title="Select Color",
                      content=content,
                      size_hint=(0.4, 0.6))
        popup.open()
Exemplo n.º 3
0
 def on_alert_color(self):
     content = ColorPickerView(color=self.alertRange.color)
     content.bind(on_color_selected=self.alertColorSelected)
     content.bind(on_color_cancel=self.dismiss_popup)
     self.show_color_select_popup('Alert Color', content)
Exemplo n.º 4
0
 def on_warn_color(self):
     content = ColorPickerView(color=self.warnRange.color)
     content.bind(on_color_selected=self.warnColorSelected)
     content.bind(on_color_cancel=self.dismiss_popup)
     self.show_color_select_popup('Warning Color', content)
 def on_alert_color(self):
     content = ColorPickerView(color=self.alertRange.color)
     content.bind(on_color_selected=self.alertColorSelected)
     content.bind(on_color_cancel=self.dismiss_popup)
     self.show_color_select_popup('Alert Color', content)
 def on_warn_color(self):
     content = ColorPickerView(color=self.warnRange.color)
     content.bind(on_color_selected=self.warnColorSelected)
     content.bind(on_color_cancel=self.dismiss_popup)
     self.show_color_select_popup('Warning Color', content)