Skip to content

Commit d3ab679

Browse files
committed
Minor changes
1 parent 07c99f7 commit d3ab679

File tree

6 files changed

+36
-17
lines changed

6 files changed

+36
-17
lines changed
540 Bytes
Binary file not shown.

Kivy/helpers.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
username_helper = """
2+
MDTextField:
3+
hint_text: "Enter your username"
4+
size_hint_x: None
5+
width: 400
6+
icon_right: "account"
7+
"""
8+
9+
password_helper = """
10+
MDTextField:
11+
hint_text: "Enter your password"
12+
helper_text: "or click on forgot password"
13+
helper_text_mode: "on_focus"
14+
size_hint_x: None
15+
width: 400
16+
icon_right: "key-variant"
17+
password: True
18+
"""

Kivy/home.py

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,42 +3,46 @@
33
from kivymd.uix.screen import Screen
44
from kivymd.uix.list import OneLineListItem, MDList
55
from kivymd.uix.boxlayout import MDBoxLayout
6-
from kivymd.uix.list import IconRightWidget
6+
from kivymd.uix.list import IconRightWidget, ThreeLineIconListItem, IconLeftWidget, ImageLeftWidget
77

88

99
class DemoApp(MDApp):
1010

1111
def build(self):
1212

13+
self.theme_cls.primary_palette = "Green"
14+
1315
screen = Screen()
1416

15-
box_layout = MDBoxLayout(
16-
orientation = "vertical",
17-
spacing = 10,
18-
pos_hint = {"center_x":0.5, "center_y":0.5},
19-
size_hint = (None, None)
20-
)
17+
# box_layout = MDBoxLayout(
18+
# orientation = "vertical",
19+
# spacing = 10,
20+
# pos_hint = {"center_x":0.5, "center_y":0.5},
21+
# size_hint = (None, None)
22+
# )
2123

22-
box_layout.width = 400
24+
# box_layout.width = 400
2325

2426
list_view = MDList()
2527

26-
icon = IconRightWidget(icon="android")
2728

2829
for lst in range(1, 6):
29-
list_items = OneLineListItem(text=f"List {str(lst)}")
30+
image = ImageLeftWidget(source='kui.png', on_release=self.kui)
31+
list_items = ThreeLineIconListItem(text=f"List {str(lst)}", on_release=self.kui)
32+
list_items.add_widget(image)
3033
list_view.add_widget(list_items)
3134

32-
list_items.add_widget(icon)
33-
34-
box_layout.add_widget(list_view)
35+
# box_layout.add_widget(list_view)
3536

36-
screen.add_widget(box_layout)
37+
screen.add_widget(list_view)
3738

3839

3940
return screen
4041
def list_one(self, obj):
4142
print("Hello world")
4243

44+
def kui(self, obj):
45+
print("Hello kui")
46+
4347
if __name__ == "__main__":
4448
DemoApp().run()

Kivy/kui.png

42 KB
Loading

Kivy/main.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
password: True
2727
"""
2828

29-
30-
3129
class Demo(MDApp):
3230

3331
def build(self):

Kivy/tempCodeRunnerFile.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)