Skip to content

Commit e6e047e

Browse files
One-style documentation for each file
1 parent 468c9e1 commit e6e047e

Some content is hidden

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

41 files changed

+1132
-785
lines changed

kivymd/__init__.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# -*- coding: utf-8 -*-
22

3+
"""
4+
KivyMD
5+
======
6+
7+
Copyright © 2010-2018 HeaTTheatR
8+
9+
For suggestions and questions:
10+
11+
12+
This file is distributed under the terms of the same license,
13+
as the Kivy framework.
14+
"""
15+
316
import os
417

518
from kivy import Logger

kivymd/accordion.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# -*- coding: utf-8 -*-
22

3+
"""
4+
Accordion
5+
=========
6+
7+
Copyright © 2010-2018 HeaTTheatR
8+
9+
For suggestions and questions:
10+
11+
12+
This file is distributed under the terms of the same license,
13+
as the Kivy framework.
14+
"""
15+
316
from kivy.lang import Builder
417
from kivy.properties import StringProperty, ListProperty, OptionProperty, \
518
ObjectProperty

kivymd/accordionlistitem.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# -*- coding: utf-8 -*-
22

3-
'''
4-
accordionlistitem.py
3+
"""
4+
Accordion List Item
5+
===================
56
67
Copyright © 2010-2018 HeaTTheatR
78
@@ -11,7 +12,8 @@
1112
This file is distributed under the terms of the same license,
1213
as the Kivy framework.
1314
14-
EXAMPLE:
15+
Example
16+
-------
1517
1618
from kivy.app import App
1719
from kivy.lang import Builder
@@ -25,7 +27,7 @@
2527
from kivymd.accordionlistitem import MDAccordionListItem
2628
from kivymd.toast import toast
2729
28-
Builder.load_string("""
30+
Builder.load_string('''
2931
#:import Toolbar kivymd.toolbar.Toolbar
3032
#:import get_hex_from_color kivy.utils.get_hex_from_color
3133
#:import TwoLineIconListItem kivymd.list.TwoLineIconListItem
@@ -99,7 +101,7 @@
99101
cols: 1
100102
size_hint_y: None
101103
height: self.minimum_height
102-
""")
104+
''')
103105
104106
105107
class ContentForAnimCard(BoxLayout):
@@ -138,7 +140,7 @@ def callback(text):
138140
139141
140142
Example().run()
141-
'''
143+
"""
142144

143145
from kivy.lang import Builder
144146
from kivy.animation import Animation

kivymd/backgroundcolorbehavior.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# -*- coding: utf-8 -*-
22

3+
"""
4+
Background Color Behavior
5+
=========================
6+
7+
Copyright © 2010-2018 HeaTTheatR
8+
9+
For suggestions and questions:
10+
11+
12+
This file is distributed under the terms of the same license,
13+
as the Kivy framework.
14+
"""
15+
316
from kivy.lang import Builder
417
from kivy.properties import BoundedNumericProperty, ReferenceListProperty
518
from kivy.properties import OptionProperty, ListProperty

kivymd/bottomsheet.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
# -*- coding: utf-8 -*-
22

3-
'''
3+
"""
44
Bottom Sheets
55
=============
66
7-
`Material Design spec Bottom Sheets page <http://www.google.com/design/spec/components/bottom-sheets.html>`_
7+
Copyright © 2010-2018 HeaTTheatR
8+
9+
For suggestions and questions:
10+
11+
12+
This file is distributed under the terms of the same license,
13+
as the Kivy framework.
14+
15+
`Material Design spec, Sheets: bottom <https://material.io/design/components/sheets-bottom.html>`
816
917
In this module there's the :class:`MDBottomSheet` class which will let you implement your own Material Design Bottom Sheets, and there are two classes called :class:`MDListBottomSheet` and :class:`MDGridBottomSheet` implementing the ones mentioned in the spec.
1018
11-
Examples
12-
--------
19+
Example
20+
-------
1321
1422
.. note::
1523
@@ -36,10 +44,7 @@
3644
bs.add_item("Da Cloud", lambda x: x, icon_src='./assets/cloud-upload.png')
3745
bs.add_item("Camera", lambda x: x, icon_src='./assets/camera.png')
3846
bs.open()
39-
40-
API
41-
---
42-
'''
47+
"""
4348

4449
from kivy.clock import Clock
4550
from kivy.lang import Builder

kivymd/button.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
# -*- coding: utf-8 -*-
22

3-
'''
3+
"""
44
Buttons
55
=======
66
7-
`Material Design spec, Buttons page <https://www.google.com/design/spec/components/buttons.html>`_
8-
9-
`Material Design spec, Buttons: Floating Action Button page <https://www.google.com/design/spec/components/buttons-floating-action-button.html>`_
10-
117
Copyright © 2010-2018 HeaTTheatR
128
139
For suggestions and questions:
@@ -16,15 +12,20 @@
1612
This file is distributed under the terms of the same license,
1713
as the Kivy framework.
1814
19-
EXAMPLE:
15+
`Material Design spec, Buttons <https://material.io/design/components/buttons.html>`
16+
17+
`Material Design spec, Buttons: floating action button <https://material.io/design/components/buttons-floating-action-button.html>`
18+
19+
Example
20+
-------
2021
2122
from kivy.app import App
2223
from kivy.lang import Builder
2324
from kivy.factory import Factory
2425
2526
from kivymd.theming import ThemeManager
2627
27-
Builder.load_string("""
28+
Builder.load_string('''
2829
#:import Toolbar kivymd.toolbar.Toolbar
2930
#:import MDIconButton kivymd.button.MDIconButton
3031
#:import MDFloatingActionButton kivymd.button.MDFloatingActionButton
@@ -116,7 +117,7 @@
116117
MDTextButton:
117118
text: "MDTextButton"
118119
pos_hint: {'center_x': 0.5, 'center_y': .05}
119-
""")
120+
''')
120121
121122
122123
class Example(App):
@@ -130,7 +131,7 @@ def build(self):
130131
131132
132133
Example().run()
133-
'''
134+
"""
134135

135136
from kivy.clock import Clock
136137
from kivy.graphics.context_instructions import Color

kivymd/card.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# -*- coding: utf-8 -*-
22

3-
'''
4-
card.py
3+
"""
4+
Cards
5+
=====
56
67
Copyright © 2010-2018 HeaTTheatR
78
@@ -11,7 +12,10 @@
1112
This file is distributed under the terms of the same license,
1213
as the Kivy framework.
1314
14-
EXAMPLE:
15+
`Material Design spec, Cards <https://material.io/design/components/cards.html>`
16+
17+
Example
18+
-------
1519
1620
from kivy.app import App
1721
from kivy.lang import Builder
@@ -22,7 +26,7 @@
2226
from kivymd.toast import toast
2327
2428
25-
Builder.load_string("""
29+
Builder.load_string('''
2630
#:import Toolbar kivymd.toolbar.Toolbar
2731
2832
@@ -50,7 +54,7 @@
5054
padding: dp(5)
5155
size_hint_y: None
5256
height: self.minimum_height
53-
""")
57+
''')
5458
5559
5660
class Example(App):
@@ -115,7 +119,7 @@ def callback(instance, value):
115119
116120
117121
Example().run()
118-
'''
122+
"""
119123

120124
from kivy.animation import Animation
121125
from kivy.clock import Clock

kivymd/chips.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# -*- coding: utf-8 -*-
22

3-
'''
4-
chips.py
3+
"""
4+
Chips
5+
=====
56
67
Copyright © 2010-2018 HeaTTheatR
78
@@ -11,14 +12,17 @@
1112
This file is distributed under the terms of the same license,
1213
as the Kivy framework.
1314
14-
EXAMPLE:
15+
`Material Design spec, Chips <https://material.io/design/components/chips.html>`
16+
17+
Example
18+
-------
1519
1620
from kivy.app import App
1721
from kivy.lang import Builder
1822
1923
from kivymd.theming import ThemeManager
2024
21-
kv = """
25+
kv = '''
2226
#:import Toolbar kivymd.toolbar.Toolbar
2327
#:import MDChip kivymd.chips.MDChip
2428
#:import MDChooseChip kivymd.chips.MDChooseChip
@@ -154,7 +158,7 @@
154158
label: 'Facebook'
155159
icon: 'facebook'
156160
callback: app.callback
157-
"""
161+
'''
158162
159163
160164
class MyApp(App):
@@ -169,7 +173,7 @@ def build(self):
169173
170174
171175
MyApp().run()
172-
'''
176+
"""
173177

174178
from kivy.metrics import dp
175179
from kivy.properties import StringProperty, ListProperty, ObjectProperty, \

kivymd/color_definitions.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
# -*- coding: utf-8 -*-
2+
3+
"""
4+
Color Definitions
5+
=====
6+
7+
Copyright © 2010-2018 HeaTTheatR
8+
9+
For suggestions and questions:
10+
11+
12+
This file is distributed under the terms of the same license,
13+
as the Kivy framework.
14+
15+
`Material Design spec, The color system <https://material.io/design/color/the-color-system.html>`
16+
"""
17+
118
colors = {
219
'Red': {
320
'200': 'ef9a9a',

kivymd/date_picker.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# -*- coding: utf-8 -*-
22

3+
"""
4+
Date picker
5+
===========
6+
7+
Copyright © 2010-2018 HeaTTheatR
8+
9+
For suggestions and questions:
10+
11+
12+
This file is distributed under the terms of the same license,
13+
as the Kivy framework.
14+
"""
15+
316
import datetime
417
import calendar
518
from datetime import date

0 commit comments

Comments
 (0)