-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.kv
204 lines (199 loc) · 7.46 KB
/
main.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
#:kivy 2.0.0
<Interface>:
orientation: 'horizontal'
ImageWithConfig:
size_hint_x: 0.4
id: image_promo
pos: self.pos
size: self.size
allow_stretch: True
keep_ratio: False
source: self.check_path_promo()
ImageWithConfig:
size_hint_x: .6
id: image_bg
pos: self.pos
size: self.size
allow_stretch: True
keep_ratio: False
source: self.check_path_bg()
BoxLayout:
orientation: 'vertical'
size_hint: None, None
size: image_bg.size
pos: image_bg.pos
padding: [32,32,32,32]
LabelWithConfig:
id: title_main
markup: True
size_hint_y: 0.7
text_size: self.size
size: self.texture_size
bold: True
padding_x: 56
text: '{}' .format(self.check_title())
font_size: '64sp'
outline_width: 1
outline_color: (0,0,0)
halign: 'center'
valign: 'middle'
BoxLayout:
size_hint_y: 0.3
padding: [30,]
spacing: '15sp'
halign: 'center'
orientation: 'horizontal'
# Widget:
# size_hint_x: .01
SocialButton:
id: btn_yandex
on_press: self.open_link(self.yandex_link)
pos_hint: {'center_x': 0.3 , 'center_y': .5}
opacity: self.hide_btn('Buttons', 'yandex_hide')[0]
disabled: self.hide_btn('Buttons', 'yandex_hide')[1]
size_hint_x: self.hide_btn('Buttons', 'yandex_hide')[2]
canvas.before:
Color:
rgba: (255/255,255/255,255/255,1)
RoundedRectangle:
pos: self.pos
size: self.size
radius: [16,]
SocialStackLayout:
spacing: 16
Widget:
size_hint_x: .09
Image:
source: 'source/yandex_icon.png'
size_hint_x: None
size: 40, self.height
Label:
size_hint_x: None
width: self.width
text: "Yandex"
font_size: 32
bold: True
color: 0,0,0,1
Widget:
size_hint_x: .11
SocialButton:
id: btn_twogis
on_press: self.open_link(self.twogis_link)
pos_hint: {'center_x': 0.3 , 'center_y': .5}
opacity: self.hide_btn('Buttons', 'twogis_hide')[0]
disabled: self.hide_btn('Buttons', 'twogis_hide')[1]
size_hint_x: self.hide_btn('Buttons', 'twogis_hide')[2]
canvas.before:
Color:
rgba: (163/255,198/255,38/255,1)
RoundedRectangle:
pos: self.pos
size: self.size
radius: [16,]
SocialStackLayout:
Widget:
size_hint_x: .1
Image:
source: 'source/2gis_icon.png'
size_hint_x: None
Widget:
size_hint_x: .1
SocialButton:
id: btn_insta
on_press: self.open_link(self.insta_link)
pos_hint: {'center_x': 0.3 , 'center_y': .5}
opacity: self.hide_btn('Buttons', 'insta_hide')[0]
disabled: self.hide_btn('Buttons', 'insta_hide')[1]
size_hint_x: self.hide_btn('Buttons', 'insta_hide')[2]
canvas.before:
Color:
rgba: (240/255,0/255,115/255,1)
RoundedRectangle:
pos: self.pos
size: self.size
radius: [16,]
SocialStackLayout:
spacing: 40
Widget:
size_hint_x: .09
Image:
source: 'source/instagram_icon.png'
size_hint_x: None
size: 40, self.height
Label:
size_hint_x: None
width: self.width
text: "Instagram"
font_size: 32
bold: True
color: 1,1,1,1
Widget:
size_hint_x: .11
SocialButton:
id: btn_vk
on_press: self.open_link(self.vk_link)
pos_hint: {'center_x': 0.7 , 'center_y': .5}
opacity: self.hide_btn('Buttons', 'vk_hide')[0]
disabled: self.hide_btn('Buttons', 'vk_hide')[1]
size_hint_x: self.hide_btn('Buttons', 'vk_hide')[2]
canvas.before:
Color:
rgba: (24/255,119/255,242/255,1)
RoundedRectangle:
pos: self.pos
size: self.size
radius: [16,]
SocialStackLayout:
spacing: 40
Widget:
size_hint_x: .09
Image:
source: 'source/vkontakte_icon.png'
size_hint_x: None
size: 40, self.height
allow_stretch: False
keep_ratio: True
Label:
bold: True
size_hint_x: None
width: self.width
text: "Vkontakte"
font_size: 32
color: 1,1,1,1
Widget:
size_hint_x: .11
# Widget:
# size_hint_x: .01
<PopupLabel>
text_size: self.size
padding_x: 24
padding_y: 16
size: self.texture_size
valign: 'middle'
halign: 'center'
font_size: '19sp'
<PopupButtonClose>:
markup: True
background_color: 70/255,70/255,70/255,.8
background_normal: ''
size_hint: None, None
size: 300, 100
font_size: '17sp'
<PopupButtonContinue>:
markup: True
background_color: 240 / 255, 0 / 255, 115 / 255, .8
background_normal: ''
size_hint: None, None
size: 300, 100
font_size: '17sp'
<SocialButton>:
markup: True
background_color: 1,1,1,0
background_normal: ''
size_hint_y: None
size: self.texture_size
height: 100
<SocialStackLayout@BoxLayout>:
orientation: 'horizontal'
pos: self.parent.pos
size: self.parent.size