Skip to content

Commit eccfc58

Browse files
committed
2.0.0 - Material Design 3
- Added supporting Material Design 3; - Added new color schemes and effects;
1 parent 1152d3c commit eccfc58

File tree

141 files changed

+14322
-20437
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+14322
-20437
lines changed

.idea/KivyMD.iml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/sources/changelog/unreleased.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,4 @@ Unreleased
6262
* `MDDropdownMenu <https://kivymd.readthedocs.io/en/latest/components/menu/>`_ `API break <>https://kivymd.readthedocs.io/en/latest/components/menu/#api-break`_;
6363
* 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;
6464
* `Fixed <https://github.com/kivymd/KivyMD/commit/9d2e837a161ca45e0ac09d24cad2f22dd032aa4f>`_ scaling and rotation of widgets with elevation behavior;
65+
* Removed `MDBanner` widget;

examples/appbar.py

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
from kivy.lang import Builder
2+
3+
from kivymd.app import MDApp
4+
5+
from examples.common_app import CommonApp
6+
7+
KV = """
8+
MDScreen:
9+
md_bg_color: self.theme_cls.secondaryContainerColor
10+
11+
MDIconButton:
12+
on_release: app.open_menu(self)
13+
pos_hint: {"top": .98}
14+
x: "12dp"
15+
icon: "menu"
16+
17+
MDBoxLayout:
18+
orientation: "vertical"
19+
adaptive_height: True
20+
size_hint_x: .8
21+
spacing: "12dp"
22+
pos_hint: {"center_x": .5, "center_y": .5}
23+
24+
MDTopAppBar:
25+
id: appbar
26+
type: "small"
27+
28+
MDTopAppBarLeadingButtonContainer:
29+
30+
MDActionTopAppBarButton:
31+
icon: "arrow-left"
32+
33+
MDTopAppBarTitle:
34+
text: "AppBar small"
35+
36+
MDTopAppBarTrailingButtonContainer:
37+
38+
MDActionTopAppBarButton:
39+
icon: "attachment"
40+
41+
MDActionTopAppBarButton:
42+
icon: "calendar"
43+
44+
MDActionTopAppBarButton:
45+
icon: "dots-vertical"
46+
47+
MDTopAppBar:
48+
id: appbar_custom
49+
type: "small"
50+
51+
MDTopAppBarLeadingButtonContainer:
52+
53+
MDActionTopAppBarButton:
54+
icon: "arrow-left"
55+
theme_icon_color: "Custom"
56+
icon_color: "green"
57+
58+
MDTopAppBarTitle:
59+
text: "AppBar small"
60+
theme_text_color: "Custom"
61+
text_color: "green"
62+
63+
MDTopAppBarTrailingButtonContainer:
64+
65+
MDActionTopAppBarButton:
66+
icon: "attachment"
67+
theme_icon_color: "Custom"
68+
icon_color: "green"
69+
70+
MDActionTopAppBarButton:
71+
icon: "calendar"
72+
theme_icon_color: "Custom"
73+
icon_color: "green"
74+
75+
MDActionTopAppBarButton:
76+
icon: "dots-vertical"
77+
theme_icon_color: "Custom"
78+
icon_color: "green"
79+
"""
80+
81+
82+
class Example(MDApp, CommonApp):
83+
def build(self):
84+
return Builder.load_string(KV)
85+
86+
def disabled_widgets(self):
87+
self.root.ids.appbar.disabled = not self.root.ids.appbar.disabled
88+
self.root.ids.appbar_custom.disabled = self.root.ids.appbar.disabled
89+
90+
91+
Example().run()

examples/badge.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
from kivy.lang import Builder
2+
3+
from kivymd.app import MDApp
4+
5+
from examples.common_app import CommonApp
6+
7+
KV = '''
8+
MDScreen:
9+
md_bg_color: self.theme_cls.backgroundColor
10+
11+
MDIconButton:
12+
on_release: app.open_menu(self)
13+
pos_hint: {"top": .98}
14+
x: "12dp"
15+
icon: "menu"
16+
17+
MDIcon:
18+
id: icon
19+
icon: "gmail"
20+
pos_hint: {'center_x': .5, 'center_y': .5}
21+
22+
MDBadge:
23+
text: "12"
24+
'''
25+
26+
27+
class Example(MDApp, CommonApp):
28+
def build(self):
29+
return Builder.load_string(KV)
30+
31+
def disabled_widgets(self):
32+
self.root.ids.icon.disabled = not self.root.ids.icon.disabled
33+
34+
35+
Example().run()

0 commit comments

Comments
 (0)