Exemple #1
0
    def __init__(self, **kwargs):
        kwargs['background_normal'] = 'media/btn.png'

        if kwargs['group'] == 'notes':
            kwargs['background_down'] = 'media/btn_down_g.png'
        else:
            kwargs['background_down'] = 'media/btn_down.png'

        kwargs['border'] = (2,) * 4

        if kwargs.get('state') == 'down':
            kwargs['color'] = COLOR_DOWN
        else:
            kwargs['color'] = COLOR_NORMAL

        if kwargs['group'] == 'notes':
            kwargs['font_name'] = 'DroidSans-Regular.ttf'

        kwargs['font_size'] = 15
        kwargs['markup'] = False

        self.rel = kwargs['rel']
        del kwargs['rel']

        ToggleButton.__init__(self, **kwargs)

        self.bind(state=state_change)
Exemple #2
0
    def __init__(self, **kwargs):
        kwargs['background_normal'] = 'media/btn.png'

        if kwargs['group'] == 'notes':
            kwargs['background_down'] = 'media/btn_down_g.png'
        else:
            kwargs['background_down'] = 'media/btn_down.png'

        kwargs['border'] = (2, ) * 4

        if kwargs.get('state') == 'down':
            kwargs['color'] = COLOR_DOWN
        else:
            kwargs['color'] = COLOR_NORMAL

        if kwargs['group'] == 'notes':
            kwargs['font_name'] = 'DroidSans-Regular.ttf'

        kwargs['font_size'] = 15
        kwargs['markup'] = False

        self.rel = kwargs['rel']
        del kwargs['rel']

        ToggleButton.__init__(self, **kwargs)

        self.bind(state=state_change)
Exemple #3
0
 def __init__(self, client, topic, **kwargs):
     MQTTButtonBehaviour.__init__(self, client=client, topic=topic)
     ToggleButton.__init__(self, **kwargs)
Exemple #4
0
 def __init__(self, *args, **kwargs):
     global modkeylist
     modkeylist.append(self)
     ToggleButton.__init__(self, *args, **kwargs)
Exemple #5
0
    def __init__(self, **kwargs):

        ToggleButton.__init__(self, **kwargs)
        self.text = 'Select Bays'
        self.disabled = True