Skip to content

Commit

Permalink
2.0.0 - Material Design 3
Browse files Browse the repository at this point in the history
- Added supporting Material Design 3;
- Added new color schemes and effects;
  • Loading branch information
HeaTTheatR committed Nov 20, 2023
1 parent 1152d3c commit eccfc58
Show file tree
Hide file tree
Showing 141 changed files with 14,322 additions and 20,437 deletions.
2 changes: 1 addition & 1 deletion .idea/KivyMD.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/sources/changelog/unreleased.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,4 @@ Unreleased
* `MDDropdownMenu <https://kivymd.readthedocs.io/en/latest/components/menu/>`_ `API break <>https://kivymd.readthedocs.io/en/latest/components/menu/#api-break`_;
* Added the `motion_behavior <https://kivymd.readthedocs.io/en/latest/behaviors/motion/#api-kivymd-uix-behaviors-motion-behavior>`_ module to the `behaviors` package to control the display/hide behavior of widgets;
* `Fixed <https://github.com/kivymd/KivyMD/commit/9d2e837a161ca45e0ac09d24cad2f22dd032aa4f>`_ scaling and rotation of widgets with elevation behavior;
* Removed `MDBanner` widget;
91 changes: 91 additions & 0 deletions examples/appbar.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
from kivy.lang import Builder

from kivymd.app import MDApp

from examples.common_app import CommonApp

KV = """
MDScreen:
md_bg_color: self.theme_cls.secondaryContainerColor
MDIconButton:
on_release: app.open_menu(self)
pos_hint: {"top": .98}
x: "12dp"
icon: "menu"
MDBoxLayout:
orientation: "vertical"
adaptive_height: True
size_hint_x: .8
spacing: "12dp"
pos_hint: {"center_x": .5, "center_y": .5}
MDTopAppBar:
id: appbar
type: "small"
MDTopAppBarLeadingButtonContainer:
MDActionTopAppBarButton:
icon: "arrow-left"
MDTopAppBarTitle:
text: "AppBar small"
MDTopAppBarTrailingButtonContainer:
MDActionTopAppBarButton:
icon: "attachment"
MDActionTopAppBarButton:
icon: "calendar"
MDActionTopAppBarButton:
icon: "dots-vertical"
MDTopAppBar:
id: appbar_custom
type: "small"
MDTopAppBarLeadingButtonContainer:
MDActionTopAppBarButton:
icon: "arrow-left"
theme_icon_color: "Custom"
icon_color: "green"
MDTopAppBarTitle:
text: "AppBar small"
theme_text_color: "Custom"
text_color: "green"
MDTopAppBarTrailingButtonContainer:
MDActionTopAppBarButton:
icon: "attachment"
theme_icon_color: "Custom"
icon_color: "green"
MDActionTopAppBarButton:
icon: "calendar"
theme_icon_color: "Custom"
icon_color: "green"
MDActionTopAppBarButton:
icon: "dots-vertical"
theme_icon_color: "Custom"
icon_color: "green"
"""


class Example(MDApp, CommonApp):
def build(self):
return Builder.load_string(KV)

def disabled_widgets(self):
self.root.ids.appbar.disabled = not self.root.ids.appbar.disabled
self.root.ids.appbar_custom.disabled = self.root.ids.appbar.disabled


Example().run()
35 changes: 35 additions & 0 deletions examples/badge.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
from kivy.lang import Builder

from kivymd.app import MDApp

from examples.common_app import CommonApp

KV = '''
MDScreen:
md_bg_color: self.theme_cls.backgroundColor
MDIconButton:
on_release: app.open_menu(self)
pos_hint: {"top": .98}
x: "12dp"
icon: "menu"
MDIcon:
id: icon
icon: "gmail"
pos_hint: {'center_x': .5, 'center_y': .5}
MDBadge:
text: "12"
'''


class Example(MDApp, CommonApp):
def build(self):
return Builder.load_string(KV)

def disabled_widgets(self):
self.root.ids.icon.disabled = not self.root.ids.icon.disabled


Example().run()
Loading

0 comments on commit eccfc58

Please sign in to comment.