-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdesign.kv
106 lines (93 loc) · 3.39 KB
/
design.kv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#:import MDRaisedButton kivymd.uix.button.MDRaisedButton
#:import MDTextField kivymd.uix.textfield.MDTextField
#:import MDFloatingActionButton kivymd.uix.button.MDFloatingActionButton
#:import MDLabel kivymd.uix.label.MDLabel
#:import Window kivy.core.window.Window
ScreenManager:
MainScreen:
<MainScreen>:
name: 'main'
BoxLayout:
orientation: 'vertical'
padding: [dp(10), dp(20)]
spacing: dp(10)
BoxLayout:
orientation: 'vertical'
size_hint_y: None
height: self.minimum_height
spacing: dp(10)
MDTextField:
id: input_rial
hint_text: app.reshape_text("Rial:")
input_filter: 'int'
size_hint_x: None
width: min(dp(300), Window.width * 0.8)
pos_hint: {'center_x': 0.5}
font_name: 'Vazir'
halign: 'right'
on_text: root.update_input_label(self.text, 'rial')
MDLabel:
id: input_rial_label
text: ""
halign: 'right'
theme_text_color: 'Secondary'
font_name: 'Vazir'
size_hint_y: None
height: dp(30)
MDRaisedButton:
text: app.reshape_text("تبدیل به تومان")
pos_hint: {'center_x': 0.5}
on_press: root.convert_to_toman()
font_name: 'Vazir'
size_hint_y: None
height: dp(40)
BoxLayout:
orientation: 'vertical'
size_hint_y: None
height: self.minimum_height
spacing: dp(10)
MDTextField:
id: input_toman
hint_text: app.reshape_text("Toman:")
input_filter: 'int'
size_hint_x: None
width: min(dp(300), Window.width * 0.8)
pos_hint: {'center_x': 0.5}
font_name: 'Vazir'
halign: 'right'
on_text: root.update_input_label(self.text, 'toman')
MDLabel:
id: input_toman_label
text: ""
halign: 'right'
theme_text_color: 'Secondary'
font_name: 'Vazir'
size_hint_y: None
height: dp(30)
MDRaisedButton:
text: app.reshape_text("تبدیل به ریال")
pos_hint: {'center_x': 0.5}
on_press: root.convert_to_rial()
font_name: 'Vazir'
size_hint_y: None
height: dp(40)
BoxLayout:
orientation: 'vertical'
size_hint_y: None
height: self.minimum_height
spacing: dp(10)
MDLabel:
id: output
text: ""
halign: 'center'
valign: 'top'
theme_text_color: 'Primary'
font_name: 'Vazir'
size_hint_y: None
height: dp(100)
text_size: self.width, None
MDFloatingActionButton:
icon: "github_icon.png"
pos_hint: {'center_x': 0.5, 'center_y': 0.1}
on_press: app.open_github()
md_bg_color: 1, 1, 1, 1