How to use the kivymd.images_path 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 AndreMiras / KivyMD / kivymd / theming.py View on Github external
def __init__(self, **kwargs):
        super(ThemeManager, self).__init__(**kwargs)
        self.rec_shadow = Atlas('{}rec_shadow.atlas'.format(images_path))
        self.rec_st_shadow = Atlas('{}rec_st_shadow.atlas'.format(images_path))
        self.quad_shadow = Atlas('{}quad_shadow.atlas'.format(images_path))
        self.round_shadow = Atlas('{}round_shadow.atlas'.format(images_path))
        Clock.schedule_once(lambda x: self.on_theme_style(0, self.theme_style))
        self._determine_device_orientation(None, Window.size)
        Window.bind(size=self._determine_device_orientation)
github HeaTTheatR / KivyMD / kivymd / theming.py View on Github external
def __init__(self, **kwargs):
        super().__init__(**kwargs)
        self.rec_shadow = Atlas(f"{images_path}rec_shadow.atlas")
        self.rec_st_shadow = Atlas(f"{images_path}rec_st_shadow.atlas")
        self.quad_shadow = Atlas(f"{images_path}quad_shadow.atlas")
        self.round_shadow = Atlas(f"{images_path}round_shadow.atlas")
        Clock.schedule_once(lambda x: self.on_theme_style(0, self.theme_style))
        self._determine_device_orientation(None, Window.size)
        Window.bind(size=self._determine_device_orientation)
github HeaTTheatR / KivyMD / kivymd / uix / bottomsheet.py View on Github external
]
                       
"""
)


class BsPadding(ButtonBehavior, FloatLayout):
    pass


class BottomSheetContent(BackgroundColorBehavior, GridLayout):
    pass


class MDBottomSheet(ThemableBehavior, ModalView):
    background = f"{images_path}transparent.png"
    """Private attribute."""

    duration_opening = NumericProperty(0.15)
    """Duration of animation."""

    radius = NumericProperty(25)
    """The value of the rounding of the corners of the dialog."""

    radius_from = OptionProperty(
        None,
        options=[
            "top_left",
            "top_right",
            "top",
            "bottom_right",
            "bottom_left",
github AndreMiras / KivyMD / kivymd / navigationdrawer.py View on Github external
elif issubclass(widget.__class__, NavigationDrawerHeaderBase):
            self._header_container.add_widget(widget)
        else:
            super(MDNavigationDrawer, self).add_widget(widget, index)


class NavigationLayout(VendorNavigationDrawer, ThemableBehavior):
    '''
    The container layout that manages the :class:`MDNavigationDrawer`.
    '''
    opening_transition = StringProperty('out_sine')
    closing_transition = StringProperty('out_sine')
    min_dist_to_open = NumericProperty(0.2)
    min_dist_to_close = NumericProperty(0.8)
    anim_time = NumericProperty(0.2)
    separator_image = StringProperty('{}'.format(images_path + '/transparent.png'))
    side_panel_positioning = 'left'
    side_panel_width = NumericProperty(dp(320))
    max_shadow_opacity = NumericProperty(0.5)
    anim_type = StringProperty('slide_above_simple')

    def __init__(self, **kwargs):
        super(NavigationLayout, self).__init__(**kwargs)
        self.on_anim_type()

    def _anim_relax(self):
        if self.state == 'open':
            if self._anim_progress < self.min_dist_to_close:
                self.anim_to_state('closed')
            else:
                self.anim_to_state('open')
        else:
github HeaTTheatR / KivyMD / kivymd / uix / filemanager.py View on Github external
def get_source(
        self, app, source_type, instance_label, paths, index, instance_content
    ):
        if source_type == "folder" and instance_label.text != "":
            source = f"{images_path}folder.png"
        else:
            if len(paths) >= index:
                source = paths[index - 1]
            else:
                source = f"{images_path}transparent.png"
        return source
github mobile-insight / mobileinsight-mobile / app / kivymd / navigationdrawer.py View on Github external
elif issubclass(widget.__class__, NavigationDrawerHeaderBase):
            self._header_container.add_widget(widget)
        else:
            super(MDNavigationDrawer, self).add_widget(widget, index)


class NavigationLayout(VendorNavigationDrawer, ThemableBehavior):
    '''
    The container layout that manages the :class:`MDNavigationDrawer`.
    '''
    opening_transition = StringProperty('out_sine')
    closing_transition = StringProperty('out_sine')
    min_dist_to_open = NumericProperty(0.2)
    min_dist_to_close = NumericProperty(0.8)
    anim_time = NumericProperty(0.2)
    separator_image = StringProperty('{}'.format(images_path + '/transparent.png'))
    side_panel_positioning = 'left'
    side_panel_width = NumericProperty(dp(280))
    max_shadow_opacity = NumericProperty(0.5)
    anim_type = StringProperty('slide_above_simple')

    def __init__(self, **kwargs):
        super(NavigationLayout, self).__init__(**kwargs)
        self.on_anim_type()

    def _anim_relax(self):
        if self.state == 'open':
            if self._anim_progress < self.min_dist_to_close:
                self.anim_to_state('closed')
            else:
                self.anim_to_state('open')
        else:
github AndreMiras / KivyMD / kivymd / theming.py View on Github external
def __init__(self, **kwargs):
        super(ThemeManager, self).__init__(**kwargs)
        self.rec_shadow = Atlas('{}rec_shadow.atlas'.format(images_path))
        self.rec_st_shadow = Atlas('{}rec_st_shadow.atlas'.format(images_path))
        self.quad_shadow = Atlas('{}quad_shadow.atlas'.format(images_path))
        self.round_shadow = Atlas('{}round_shadow.atlas'.format(images_path))
        Clock.schedule_once(lambda x: self.on_theme_style(0, self.theme_style))
        self._determine_device_orientation(None, Window.size)
        Window.bind(size=self._determine_device_orientation)
github HeaTTheatR / KivyMD / kivymd / toast / kivytoast / kivytoast.py View on Github external
def __init__(self, **kwargs):
        super().__init__(**kwargs)
        self.size_hint = (None, None)
        self.pos_hint = {"center_x": 0.5, "center_y": 0.1}
        self.background_color = [0, 0, 0, 0]
        self.background = f"{images_path}transparent.png"
        self.opacity = 0
        self.auto_dismiss = True
        self.label_toast = Label(size_hint=(None, None), opacity=0)
        self.label_toast.bind(texture_size=self.label_check_texture_size)
        self.add_widget(self.label_toast)
github HeaTTheatR / KivyMD / kivymd / tools / packaging / pyinstaller / __init__.py View on Github external
strip=False,
    upx=True,
    name="app_name",
    console=True,
)
"""

__all__ = ("hooks_path", "datas")

from os.path import dirname, abspath, join, basename
import kivymd

hooks_path = dirname(abspath(__file__))
datas = [
    (kivymd.fonts_path, join("kivymd", basename(dirname(kivymd.fonts_path)))),
    (kivymd.images_path, join("kivymd", basename(dirname(kivymd.images_path)))),
]
hiddenimports = ["PIL"]
github Joelzeller / CoPilot / kivymd / theming.py View on Github external
def __init__(self, **kwargs):
        super(ThemeManager, self).__init__(**kwargs)
        self.rec_shadow = Atlas('{}rec_shadow.atlas'.format(images_path))
        self.rec_st_shadow = Atlas('{}rec_st_shadow.atlas'.format(images_path))
        self.quad_shadow = Atlas('{}quad_shadow.atlas'.format(images_path))
        self.round_shadow = Atlas('{}round_shadow.atlas'.format(images_path))
        Clock.schedule_once(lambda x: self.on_theme_style(0, self.theme_style))
        self._determine_device_orientation(None, Window.size)
        Window.bind(size=self._determine_device_orientation)