-
Notifications
You must be signed in to change notification settings - Fork 0
/
tela_inicial.py
74 lines (68 loc) · 2.27 KB
/
tela_inicial.py
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
from kivy.lang import Builder
from kivy.properties import ObjectProperty
from kivy.uix.boxlayout import BoxLayout
from kivymd.uix.screen import MDScreen
from kivy.uix.image import Image
from kivymd.uix.button import MDFillRoundFlatButton
kv_blink_app_name_label = """
Label:
text:"Blink"
color:1,1,1,1
font_name:"fonts/Oswald-Medium.ttf"
halign:"center"
size_hint_y: 0.2
size_hint_x: 1.0
font_size: self.width/5
"""
class TelaInicial(MDScreen):
main_app = ObjectProperty()
def vai_para_pagina_login(self, source_button):
self.main_app.screen_manager.current = "screen_05"
def vai_para_pagina_cadastro(self, source_button):
self.main_app.screen_manager.current = "screen_06"
def __init__(self, **kwargs):
super(TelaInicial, self).__init__(**kwargs)
layout = BoxLayout(
orientation='vertical',
padding=("10dp", "15dp", "10dp", "15dp"), # LTRB
pos_hint={"top": 0.9},
)
blink_logo = Image(
source='assets/Blink_Logo_Branco_Transparente.png',
size_hint_y=0.3,
)
unifesp_logo = Image(
source='assets/Unifesp_simples_verde_negativo_RGB.png',
size_hint_y=0.3,
)
login_button = MDFillRoundFlatButton(
text="Login",
font_size=28,
pos_hint={"center_x": 0.5},
size_hint_x=None,
width="200dp",
on_release=self.vai_para_pagina_login,
)
cadastrar_button = MDFillRoundFlatButton(
text="Cadastrar",
font_size=28,
pos_hint={"center_x": 0.5},
size_hint_x=None,
width="200dp",
on_release=self.vai_para_pagina_cadastro,
)
blink_app_name_label = Builder.load_string(kv_blink_app_name_label)
layout.add_widget(blink_logo)
layout.add_widget(blink_app_name_label)
layout.add_widget(login_button)
layout.add_widget(
MDFillRoundFlatButton(
text="Espacador...",
font_size=28,
pos_hint={"center_x": 0.5},
opacity=0,
)
)
layout.add_widget(cadastrar_button)
layout.add_widget(unifesp_logo)
self.add_widget(layout)