-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathweather.kv
171 lines (119 loc) · 4.06 KB
/
weather.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
# Weather App
# Copyright (c) 2023, Jignas Paturu
<FloatLayout>:
Image:
source: str(app.sky)
allow_stretch: True
Label:
font_name: 'Dubai-font/Regular.ttf'
text:str(app.ui_data[0]['city'])
size_hint: 0.3,0.7
pos_hint: {"x":0.18,"y":0.42}
font_size: 70
color:0.3,0.3,0.3,0.7
Image:
source: str( app.hill)
allow_stretch: True
### Description
Label:
font_name: 'Dubai-font/Regular.ttf'
text:str(app.ui_data[0]['we_description'])
size_hint: 0.3,0.7
pos_hint: {"x":0.25,"y":0.33}
font_size: 30
color:0,0,0,1
### Temperature
Label:
font_name: 'Dubai-font/Bold.ttf'
text:str(app.ui_newdata[0]['temp'])
size_hint: 0.3,0.7
pos_hint: {"x":0.1,"y":0.25}
font_size: 70
color:0,0,0,1
#######################################################################
# Grid
GridLayout:
rows:2
spacing:5
size_hint: 0.7,0.2
pos_hint: {"x":0.1,"y":0.2}
#### Row 1
BoxLayout:
orientation:"horizontal"
spacing:20
### Wind
BoxLayout:
Image:
source: 'icons/wind.png'
size_hint: 0.3,1
Label:
font_name: 'Dubai-font/Regular.ttf'
text:str(round(app.ui_data[0]['speed'])) +'Km/h '+ app.ui_newdata[0]['wind_dir']
font_size: 30
color:0,0,0,1
### Pressure
BoxLayout:
Image:
source: 'icons/pressure.png'
size_hint: 0.3,1
Label:
font_name: 'Dubai-font/Regular.ttf'
text:str(app.ui_data[0]['pressure']) + 'hPa'
font_size: 30
color:0,0,0,1
### Humidity
BoxLayout:
Image:
source: 'icons/humidity.png'
size_hint: 0.3,1
Label:
font_name: 'Dubai-font/Regular.ttf'
text:str(app.ui_data[0]['humidity']) + '% '
font_size: 30
color:0,0,0,1
#######################################################################
#### Row 2
BoxLayout:
orientation:"horizontal"
spacing:20
### Temperature Min
BoxLayout:
Image:
source: 'icons/temp.png'
size_hint: 0.3,1
Label:
font_name: 'Dubai-font/Regular.ttf'
text: 'Min' + str(app.ui_newdata[0]['temp_min'])+'°C'
font_size: 30
color:0,0,0,1
### Temperature Max
BoxLayout:
Image:
source: 'icons/temp.png'
size_hint: 0.3,1
Label:
font_name: 'Dubai-font/Regular.ttf'
text: 'Max' + str(app.ui_newdata[0]['temp_max'])+'°C'
font_size: 30
color:0,0,0,1
### SunRise
BoxLayout:
Image:
source: 'icons/rise.png'
size_hint: 0.3,1
Label:
font_name: 'Dubai-font/Regular.ttf'
text: str(app.ui_newdata[0]['time_sunrise'])[-8:-3]
font_size: 30
color:0,0,0,1
### SunSet
BoxLayout:
Image:
source: 'icons/set.png'
size_hint: 0.3,1
Label:
font_name: 'Dubai-font/Regular.ttf'
text: str(app.ui_newdata[0]['time_sunset'])[-8:-3]
font_size: 30
color:0,0,0,1
#######################################################################