-
-
Notifications
You must be signed in to change notification settings - Fork 674
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added supporting Material Design 3; - Added new color schemes and effects;
- Loading branch information
1 parent
1152d3c
commit eccfc58
Showing
141 changed files
with
14,322 additions
and
20,437 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
Oops, something went wrong.