-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbunkercalc.kv
228 lines (204 loc) · 6.71 KB
/
bunkercalc.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
ScreenManager:
id: manag
TabScreen:
TotalScreen:
<TabScreen>:
id: tab_screen
name: 'tab_screen'
MDBoxLayout:
orientation: "vertical"
MDTopAppBar:
id: top_menu
elevation:4
pos_hint: {"top": 1}
# anchor_title: "center"
md_bg_color: "#e7e4c0"
specific_text_color: "#4a4939"
left_action_items: [["calculator-variant", lambda x:app.screen2()]]
right_action_items: [["ship-wheel", lambda x: app.choose_vessel(x)]]
# right_action_items: [["menu", lambda x:app.screen2()]]
MDBoxLayout:
orientation : "horizontal"
MDLabel:
id: right_action
halign: "left"
theme_text_color: "Custom"
text_color: "#4a4939"
MDLabel:
id: select_vessel
halign: "right"
theme_text_color: "Custom"
text_color: "#4a4939"
# MDBoxLayout:
# orientation: "horizontal"
# # pos_hint: {"central_x": .5}
# # size: 1, 1
# # md_bg_color: app.theme_cls.primary_color
MDTabs:
id: tabs
on_tab_switch: app.on_tab_switch(*args)
# MDFlatButton:
# id : btn_tab
# text: "Tabs"
# pos_hint: {'center_x': 0.5, 'center_y': 0.25}
# on_press: root.manager.current= "total_screen"
# Will always be at the bottom of the screen.
MDBottomAppBar:
MDTopAppBar:
id: bottom_bar
title: "by Oleg Zubak"
halign : "center"
icon: "fuel"
type: "bottom"
left_action_items: [["alpha-c-box", lambda x: x]]
mode : "end"
<TotalScreen>:
name:'total_screen'
MDTopAppBar:
id: total_menu
elevation:4
pos_hint: {"top": 1}
#md_bg_color: "#e7e4c0"
specific_text_color: "#4a4939"
# right_action_items: [["menu", lambda x:(x)]]
left_action_items: [["menu", lambda x:app.screen2()]]
MDLabel:
id: right_action
halign: "left"
theme_text_color: "Custom"
text_color: "#4a4939"
MDFloatLayout:
orientation: "vertical"
MDLabel:
id: total_hfo
halign: 'center'
font_size: "30dp"
pos_hint: {'center_x': 0.5, 'center_y': 0.8}
MDLabel:
id: total_mdo
halign: 'center'
font_size: "30dp"
pos_hint: {'center_x': 0.5, 'center_y': 0.63}
MDFloatingActionButton:
id: close
text: 'Exit'
pos_hint: {'center_x': 0.5, 'center_y': 0.5}
icon: "close"
md_bg_color: ("#f56c5a")
on_press: app.stop()
MDFlatButton:
id : btn_total
text: "Go back"
md_bg_color: .3,.5,.4,1
pos_hint: {'center_x': 0.5, 'center_y': 0.3}
on_press: root.manager.current= "tab_screen"
MDBottomAppBar:
MDTopAppBar:
title: "by Oleg Zubak"
icon: "fuel"
type: "bottom"
left_action_items: [["alpha-c-box", lambda x: x]]
mode: "end"
<Tab>
# MDBoxLayout:
# orientation: "vertical"
# size_hint: .7, 1
# pos_hint: {"center_x": .4, "y":.15}
# size: 0.7, 1
# adaptive_height: True
# md_bg_color: "lightblue" #app.theme_cls.primary_color
MDTextField:
id: density_field
helper_text: "Density (example: 0.9588)"
hint_text: "Density (example: 0.8566)"
helper_text_mode: "on_focus"
# icon_left: "fuel"
# Maximal lenth of input sounding
max_text_length: 6
icon_left_color: app.theme_cls.primary_color
pos_hint: {'center_x': 0.5, 'center_y': 0.9}
size_hint: .5, None
#size: 300,1
# width: 200
# on_text_validate : app.callback_Calc(*args)
# MDBoxLayout:
# orientation: "vertical"
MDLabel:
id: label
halign: "center"
pos_hint: { 'center_y': 0.77}
size_hint: .9, None
MDLabel:
id: label_mt
halign: "center"
pos_hint: { 'center_y': 0.65}
size_hint: .9, None
font_size : "30dp"
# Enter sound value of each tank
MDTextField:
id: sound_field
helper_text: "do not input ullage!"
helper_text_mode: "on_focus"
icon_left: "fuel"
# Maximal lenth of input sounding
max_text_length: 4
icon_left_color: app.theme_cls.primary_color
pos_hint: {'center_x': 0.5, 'center_y': 0.55}
size_hint: .5, None
# size: .1, .2
# width: 200
on_text_validate : app.callback_Calc(*args)
MDFloatingActionButton:
id:calc
text: 'Calculate'
pos_hint: {'center_x': 0.5, 'center_y': 0.4}
icon: "calculator"
theme_icon_color: "Secondary"
md_bg_color: ("#465d5a")
on_press: app.callback_Calc(*args)
# size_hint: None, None
MDFloatingActionButton:
id: close
text: 'Exit'
pos_hint: {'center_x': 0.5, 'center_y': 0.25}
icon: "close"
md_bg_color: ("#f56c5a")
on_press: app.stop()
# size_hint: None, None
# MDFlatButton:
# id: calc
# text: 'Calculate'
# pos_hint: {'center_x': 0.5, 'center_y': 0.395}
# md_bg_color: ("#465d5a")
# on_press: app.callback_Calc(*args)
# Close Button
#MDFlatButton:
#id: close
#text: 'Close'
#pos_hint: {'center_x': 0.5, 'center_y': 0.285}
#md_bg_color: ("#f00c5a")
#on_press: app.stop()
MDBoxLayout:
pos_hint: { "x":.7 ,"center_y": .5}
size_hint: .3, .85
# size: 0.3, 1
orientation: "horizontal"
# md_bg_color: "green" #app.theme_cls.primary_color
MDLabel:
id: slider_lbl
text: "Temp:\n"+str(round(int(float(temp_slider.value)),0))
pos_hint: {"center_x":.05,"center_y": .4}
halign: "right"
# size_hint: .2, .2
MDSlider:
id: temp_slider
hint: False
orientation: "vertical"
hint_bg_color: "white"
min: 0
max: 100
on_value: app.my_value(*args) # <<<<<<<<<<<
value: 15
thumb_color_inactive: "red"
pos_hint: { "center_x": .2, "center_y": .55}
size_hint_y: .8