How to use the kivymd.list.ILeftBodyTouch function in kivymd

To help you get started, we’ve selected a few kivymd examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github metamarcdw / nowallet / main.py View on Github external
class YPUBScreen(Screen):
    pass


class PINScreen(Screen):
    pass


class ZbarScreen(Screen):
    pass


# Declare custom widgets
class IconLeftSampleWidget(ILeftBodyTouch, MDIconButton):
    pass


class BalanceLabel(ButtonBehavior, MDLabel):
    pass


class PINButton(MDRaisedButton):
    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.height = dp(50)
        asyncio.ensure_future(self.bind_on_release())

    async def bind_on_release(self):
        async for _ in self.async_bind("on_release"):
            app = App.get_running_app()
github gitcd-io / gitcd / gitcd / interface / kivy / mainpanel.py View on Github external
Toolbar:
            title: "Toolbar with left and right buttons"
            pos_hint: {'center_x': 0.5, 'center_y': 0.25}
            md_bg_color: app.theme_cls.bg_light
            specific_text_color: app.theme_cls.text_color
            left_action_items: [['arrow-left', lambda x: None]]
            right_action_items: [['lock', lambda x: None], \
                ['camera', lambda x: None], \
                ['play', lambda x: None]]
        MDLabel:
            color: app.theme_cls.text_color
            text: 'Some text, here is the info panel with actions'
''')


class IconLeftSampleWidget(ILeftBodyTouch, MDIconButton):
    pass


class GitcdMainPanel(BoxLayout):

    app = None
    branches = []
    tags = []

    def __init__(self, **kwargs):
        super(GitcdMainPanel, self).__init__(**kwargs)
        threading.Thread(target=self.initialize).start()

    def initialize(self, **kwargs):
        pass
github AndreMiras / KivyMD / demos / kitchen_sink / main.py View on Github external
self.root.ids.text_field_error.error = True
        else:
            self.root.ids.text_field_error.error = False

    def on_pause(self):
        return True

    def on_stop(self):
        pass


class AvatarSampleWidget(ILeftBody, Image):
    pass


class IconLeftSampleWidget(ILeftBodyTouch, MDIconButton):
    pass


class IconRightSampleWidget(IRightBodyTouch, MDCheckbox):
    pass


if __name__ == '__main__':
    KitchenSink().run()
github gitcd-io / gitcd / gitcd / interface / kivy / clean.py View on Github external
id: list

    MDRaisedButton:
        id: buttonClean
        pos: root.pos[0] + dp(10), root.pos[1] + dp(10)
        text: "Clean"
        on_release: root.clean()
        disabled: True
    MDRaisedButton:
        pos: root.pos[0]+root.size[0]-self.width-dp(10), root.pos[1] + dp(10)
        text: "Close"
        on_release: root.dismiss()
''')


class IconLeftSampleWidget(ILeftBodyTouch, MDIconButton):
    pass


class GitcdCleanDialog(FloatLayout, ModalView):

    app = None
    branches = []
    tags = []
    helper = CleanHelper()

    def open(self, **kwargs):
        super(GitcdCleanDialog, self).open(**kwargs)
        self.app = kivy.app.App.get_running_app()
        self.branches = []
        self.tags = []
github ellisonleao / pybrapp / screens / schedule.py View on Github external
active: True
        size_hint: None, None
        size: dp(46), dp(46)
        pos_hint: {'center_x': 0.5, 'center_y': 0.5}
    MDTabbedPanel:
        id: schedule_tabs
        tab_display_mode: 'text'
'''


Builder.load_string(base_schedule_screen.format(class_name='SpeechScreen', screen_name='speech', widgets=common_widgets))
Builder.load_string(base_schedule_screen.format(class_name='TutorialScreen', screen_name='tutorial', widgets=common_widgets))
Builder.load_string(base_schedule_screen.format(class_name='SprintScreen', screen_name='sprint', widgets=common_widgets))


class IconLeftSampleWidget(ILeftBodyTouch, MDIconButton):
    pass


class Track(TwoLineIconListItem):

    colors = {
            # rgb(241, 194, 65)
            'Sala Aventurine e Alexandrite': [0.94, 0.76, 0.25, .4],
            # rgb(87, 193, 219)
            'Sala Amethyst': [0.34, 0.75, 0.85, .4],
            # rgb(86, 184, 103)
            'Sala Crystal': [0.33, 0.72, 0.4, .4],
            'default': [0.5, 0.5, 0.5, .4],
    }

    def __init__(self, *args, **kwargs):
github Joelzeller / CoPilot / main.py View on Github external
if analog == 9:    #white hands to the left for info clock screen
                Color(1.0, 1.0, 1.0, 0.9)
                Line(points=[x_left, y_up, x_left+0.8*self.r*sin(pi/30*time.second), y_up+0.8*self.r*cos(pi/30*time.second)], width=1, cap="round")
                Color(1.0, 1.0, 1.0, 1)
                Line(points=[x_left, y_up, x_left+0.7*self.r*sin(pi/30*time.minute), y_up+0.7*self.r*cos(pi/30*time.minute)], width=2, cap="round")
                Color(1.0, 1.0, 1.0, 1)
                th = time.hour*60 + time.minute
                Line(points=[x_left, y_up, x_left+0.5*self.r*sin(pi/360*th), y_up+0.5*self.r*cos(pi/360*th)], width=3, cap="round")

class MyClockWidget(FloatLayout):
    Ticks = Ticks()
    pass

#KIVYMD classes
class IconLeftSampleWidget(ILeftBodyTouch, MDIconButton):
    pass

class AvatarSampleWidget(ILeftBody, Image):
    pass


#_________________________________________________________________
        #MAINAPP


class MainApp(App):
    theme_cls = ThemeManager()
    version = StringProperty()
    timenow = StringProperty()
    datenow = StringProperty()
    daynow = StringProperty()
github AndreMiras / KivyMD / kivymd / list.py View on Github external
def add_widget(self, widget, index=0):
        if issubclass(widget.__class__, ILeftBody):
            self.ids['_left_container'].add_widget(widget)
        elif issubclass(widget.__class__, ILeftBodyTouch):
            self.ids['_left_container'].add_widget(widget)
            self._touchable_widgets.append(widget)
        elif issubclass(widget.__class__, IRightBody):
            self.ids['_right_container'].add_widget(widget)
        elif issubclass(widget.__class__, IRightBodyTouch):
            self.ids['_right_container'].add_widget(widget)
            self._touchable_widgets.append(widget)
        else:
            return super(BaseListItem, self).add_widget(widget)
github gitcd-io / gitcd / gitcd / interface / kivy / infopanel.py View on Github external
padding: dp(8)
        MDLabel:
            text: 'Title'
            theme_text_color: 'Secondary'
            font_style:"Title"
            size_hint_y: None
            height: dp(36)
        MDSeparator:
            height: dp(1)
        MDLabel:
            text: 'Body'
            theme_text_color: 'Primary'
''')


class IconLeftSampleWidget(ILeftBodyTouch, MDIconButton):
    pass


class GitcdInfoPanel(MDCard):

    app = None
    branches = []
    tags = []

    def __init__(self, **kwargs):
        super(GitcdInfoPanel, self).__init__(**kwargs)
        threading.Thread(target=self.initialize).start()

    def initialize(self, **kwargs):
        pass
github AndreMiras / PyWallet / src / pywallet / list.py View on Github external
# -*- coding: utf-8 -*-
from kivymd.button import MDIconButton
from kivymd.list import ILeftBodyTouch


class IconLeftWidget(ILeftBodyTouch, MDIconButton):
    pass