How to use the kivymd.theming.ThemeManager 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 cruor99 / sadpandareader / app / main.py View on Github external
newfilter = Filters(doujinshi=filters["doujinshi"],
                            manga=filters["manga"],
                            artistcg=filters["artistcg"],
                            gamecg=filters["gamecg"],
                            western=filters["western"],
                            nonh=filters["nonh"],
                            imageset=filters["imageset"],
                            cosplay=filters["cosplay"],
                            asianporn=filters["asianporn"],
                            misc=filters["misc"])
        db.add(newfilter)
        db.commit()


class SadpandaApp(App):
    theme_cls = ThemeManager()
    nav_drawer = ObjectProperty()

    def __init__(self, **kwargs):
        super(SadpandaApp, self).__init__(**kwargs)
        Logger.info(sys.path)
        Window.bind(on_keyboard=self.onBackBtn)
        #Window.softinput_mode = "below_target"
        data_dir = getattr(self, "user_data_dir")
        self.data_dir = data_dir
        # defaultdir = Config.getdefault("kivy", "log_dir", data_dir)
        # if defaultdir == data_dir:
        #    pass
        # else:
        #    Config.set("kivy", "log_dir", data_dir)
        #    Config.set("kivy", "log_enable", 1)
        #    Config.set("kivy", "log_level", "debug")
github mobile-insight / mobileinsight-mobile / app / privacy_app.py View on Github external
text = StringProperty()
    theme_cls = ThemeManager()


    def __init__(self, **kwargs):
        self.theme_cls.theme_style = "Light"
        self.theme_cls.primary_palette = 'Blue'
        self.register_event_type('on_answer')
        super(PrivacyPopup, self).__init__(**kwargs)

    def on_answer(self, *args):
        pass


class PrivacyApp(App):
    theme_cls = ThemeManager()

    def build(self):
        file = open("privacy_agreement.txt")
        privacy_agreement = file.read()
        privacy_agreement = privacy_agreement +'\nDo you agree to share data collected on your phone?'
        content = PrivacyPopup(text=privacy_agreement)
        content.bind(on_answer=self._on_answer)
        self.popup = Popup(title="Agreement on Data Sharing",
                           content=content,
                           size_hint=(None, None),
                           size=(1200, 2300),
                           auto_dismiss=False)
        self.popup.open()

    def _on_answer(self, instance, answer):
        if answer == "yes":
github Joelzeller / CoPilot / kivymd / progressbar.py View on Github external
''' Orientation of progressbar'''

class JZWideCoolantProgressBar(ThemableBehavior, ProgressBar):
    reversed = BooleanProperty(False)
    ''' Reverse the direction the progressbar moves. '''

    orientation = OptionProperty('horizontal', options=['horizontal', 'vertical'])
    ''' Orientation of progressbar'''
            
    
if __name__ == '__main__':
    from kivy.app import App
    from kivymd.theming import ThemeManager
    
    class ProgressBarApp(App):
        theme_cls = ThemeManager()

        def build(self):
            return Builder.load_string("""#:import MDSlider kivymd.slider.MDSlider
BoxLayout:
    orientation:'vertical'
    padding: '8dp'
    MDSlider:
        id:slider
        min:0
        max:100
        value: 40
        
    MDProgressBar:
        value: slider.value
    MDProgressBar:
        reversed: True
github AndreMiras / EtherollApp / src / etherollapp / etheroll / controller.py View on Github external
dialog.open()


class DebugRavenClient(object):
    """
    The DebugRavenClient should be used in debug mode, it just raises
    the exception rather than capturing it.
    """

    def captureException(self):
        raise


class EtherollApp(App):

    theme_cls = ThemeManager()

    def build(self):
        self.icon = "docs/images/icon.png"
        self.theme_cls.theme_style = 'Dark'
        self.theme_cls.primary_palette = 'Indigo'
        Controller.start_services()
        return Controller()


def main():
    load_dotenv(dotenv_path=ENV_PATH)
    # only send Android errors to Sentry
    in_debug = platform != "android"
    client = configure_sentry(in_debug)
    try:
        EtherollApp().run()
github Joelzeller / CoPilot / main.py View on Github external
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()
    yearnow = StringProperty()
    ampm = StringProperty()
    tempnow = StringProperty()
    CPUtempnow = StringProperty()
    corevoltagenow = StringProperty()
    stopwatchnow = StringProperty()
    stopwatchsecnow = ObjectProperty()
    stopwatchmilnow = ObjectProperty()
    HKonenow = StringProperty()
    HKtwonow = StringProperty()
    radariconsource = StringProperty()
    lightsiconsource = StringProperty()
github HeaTTheatR / KivyMD / kivymd / uix / progressbar.py View on Github external
class MDProgressBar(ThemableBehavior, ProgressBar):
    reversed = BooleanProperty(False)
    """ Reverse the direction the progressbar moves. """

    orientation = OptionProperty(
        "horizontal", options=["horizontal", "vertical"]
    )
    """ Orientation of progressbar"""


if __name__ == "__main__":
    from kivy.app import App
    from kivymd.theming import ThemeManager

    class ProgressBarApp(App):
        theme_cls = ThemeManager()

        def build(self):
            return Builder.load_string(
                """
BoxLayout:
    orientation:'vertical'
    padding: '8dp'
    MDSlider:
        id:slider
        min:0
        max:100
        value: 40

    MDProgressBar:
        value: slider.value
    MDProgressBar:
github HeaTTheatR / KivyMD / kivymd / uix / picker.py View on Github external
class MDThemePicker(
    ThemableBehavior,
    FloatLayout,
    ModalView,
    SpecificBackgroundColorBehavior,
    RectangularElevationBehavior,
):
    pass


if __name__ == "__main__":
    from kivy.app import App
    from kivymd.theming import ThemeManager

    class ThemePickerApp(App):
        theme_cls = ThemeManager()

        def build(self):
            main_widget = Builder.load_string(
                """
#:import MDThemePicker kivymd.uix.picker.MDThemePicker


FloatLayout:
    MDRaisedButton:
        size_hint: None, None
        pos_hint: {'center_x': .5, 'center_y': .5}
        size: 3 * dp(48), dp(48)
        center_x: self.parent.center_x
        text: 'Open theme picker'
        on_release: MDThemePicker().open()
        opposite_colors: True
github AndreMiras / KivyMD / kivymd / slider.py View on Github external
self.active = True

    def on_touch_up(self, touch):
        if super(MDSlider, self).on_touch_up(touch):
            self.active = False
#             thumb = self.ids['thumb']
#             if thumb.collide_point(*touch.pos):
#                 thumb.on_touch_down(touch)
#                 thumb.on_touch_up(touch)

if __name__ == '__main__':
    from kivy.app import App
    from kivymd.theming import ThemeManager

    class SliderApp(App):
        theme_cls = ThemeManager()

        def build(self):
            return Builder.load_string("""
BoxLayout:
    orientation:'vertical'
    BoxLayout:
        size_hint_y:None
        height: '48dp'
        Label:
            text:"Toggle disabled"
            color: [0,0,0,1]
        CheckBox:
            on_press: slider.disabled = not slider.disabled
    BoxLayout:
        size_hint_y:None
        height: '48dp'
github HeaTTheatR / KivyMD / kivymd / theme_picker.py View on Github external
return get_color_from_hex(colors[col][self.theme_cls.accent_hue])


class MDThemePicker(ThemableBehavior, FloatLayout, ModalView,
                    SpecificBackgroundColorBehavior,
                    RectangularElevationBehavior):
    pass


if __name__ == "__main__":
    from kivy.app import App
    from kivymd.theming import ThemeManager


    class ThemePickerApp(App):
        theme_cls = ThemeManager()

        def build(self):
            main_widget = Builder.load_string('''
#:import MDRaisedButton kivymd.button.MDRaisedButton
#:import MDThemePicker kivymd.theme_picker.MDThemePicker


FloatLayout:
    MDRaisedButton:
        size_hint: None, None
        pos_hint: {'center_x': .5, 'center_y': .5}
        size: 3 * dp(48), dp(48)
        center_x: self.parent.center_x
        text: 'Open theme picker'
        on_release: MDThemePicker().open()
        opposite_colors: True
github mobile-insight / mobileinsight-mobile / app / main.py View on Github external
class ConfirmPopup(BoxLayout):
    text = StringProperty()

    def __init__(self, **kwargs):
        self.register_event_type('on_answer')
        super(ConfirmPopup, self).__init__(**kwargs)

    def on_answer(self, *args):
        Logger.error("WTF")
        pass


class MobileInsightApp(App):
    Logger.info("build MI Class")
    theme_cls = ThemeManager()
    previous_date = ObjectProperty()
    title = "MobileInsight"

    index = NumericProperty(0)
    current_title = StringProperty()
    screen_names = ListProperty([])

    use_kivy_settings = False
    Logger.info("Finish build MI Class")

    def __init__(self, **kwargs):
        Logger.info("Initializing APP")
        super(MobileInsightApp, self).__init__(**kwargs)
        self.title = 'MobileInsight'
        self.screens = {}
        self.available_screens = screens.__all__