2020-08-10 16:37:42 +00:00
|
|
|
#:include screens/login/login.kv
|
|
|
|
#:include screens/feed/feed.kv
|
|
|
|
#:include screens/post/post.kv
|
|
|
|
#:include screens/messages/messages.kv
|
|
|
|
#:include screens/notifications/notifications.kv
|
2020-08-13 07:55:59 +00:00
|
|
|
#:include screens/profile/profile.kv
|
|
|
|
|
2020-08-10 16:37:42 +00:00
|
|
|
|
|
|
|
|
2020-08-03 10:25:58 +00:00
|
|
|
#:import get_color_from_hex kivy.utils.get_color_from_hex
|
|
|
|
#:import images_path kivymd.images_path
|
|
|
|
#:import colors kivymd.color_definitions.colors
|
2020-08-03 15:48:47 +00:00
|
|
|
#:import partial functools.partial
|
|
|
|
#:import NoTransition kivy.uix.screenmanager.NoTransition
|
2020-08-05 09:15:10 +00:00
|
|
|
# :import MDCarousel kivymd.uix.carousel.MDCarousel
|
2020-08-03 10:25:58 +00:00
|
|
|
|
2020-08-06 10:24:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## CLASS DEFS
|
|
|
|
|
|
|
|
<MyBoxLayout>:
|
|
|
|
orientation: "vertical"
|
|
|
|
pos_hint: {'center_x':0.5, 'center_y':0.5}
|
|
|
|
size_hint:0.5,0.5
|
|
|
|
padding:'10dp'
|
|
|
|
md_bg_color:0,0,0,1
|
|
|
|
canvas:
|
|
|
|
Color:
|
|
|
|
rgb: 1,0,0,2
|
|
|
|
Line:
|
|
|
|
width: 1
|
|
|
|
rectangle: (self.x, self.y, self.width, self.height)
|
|
|
|
|
|
|
|
|
|
|
|
<MyLabel>:
|
|
|
|
theme_text_color: 'Custom'
|
|
|
|
text_color: (1,0,0,1)
|
2020-08-13 17:41:31 +00:00
|
|
|
# pos_hint: {'center_y': 0.5}
|
2020-08-06 10:24:09 +00:00
|
|
|
halign: 'center'
|
|
|
|
height: self.texture_size[1]
|
2020-08-13 17:41:31 +00:00
|
|
|
font_name: 'assets/font.otf'
|
|
|
|
size_hint:1,None
|
2020-08-06 10:24:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### LAYOUT
|
|
|
|
|
2020-08-03 15:48:47 +00:00
|
|
|
MyLayout:
|
2020-08-03 16:29:03 +00:00
|
|
|
scr_mngr: scr_mngr
|
|
|
|
orientation: 'vertical'
|
|
|
|
height: self.minimum_height
|
2020-08-13 17:41:31 +00:00
|
|
|
md_bg_color:0,0,0,1
|
2020-08-03 16:29:03 +00:00
|
|
|
|
|
|
|
canvas:
|
|
|
|
Color:
|
2020-08-13 17:41:31 +00:00
|
|
|
rgba: 0.925,0.925,0.925,0.99 #get_color_from_hex(colors['Gray']['900'])
|
|
|
|
# rgba: 0,0,0,0.9 #get_color_from_hex(colors['Gray']['900'])
|
2020-08-06 10:24:09 +00:00
|
|
|
|
2020-08-13 17:41:31 +00:00
|
|
|
|
2020-08-03 16:29:03 +00:00
|
|
|
Rectangle:
|
|
|
|
pos: self.pos
|
|
|
|
size: self.size
|
2020-08-13 17:41:31 +00:00
|
|
|
source: 'assets/bg.png'
|
|
|
|
# texture: app.texture
|
2020-08-03 16:29:03 +00:00
|
|
|
|
2020-08-06 10:24:09 +00:00
|
|
|
|
2020-08-03 16:29:03 +00:00
|
|
|
MDToolbar:
|
|
|
|
id: toolbar
|
|
|
|
title: app.title
|
|
|
|
pos_hint: {'center_x': .5, 'center_y': 0.95}
|
2020-08-03 20:44:53 +00:00
|
|
|
md_bg_color: 0.1,0.1,0.1,1
|
2020-08-03 16:29:03 +00:00
|
|
|
background_palette: 'Red'
|
|
|
|
background_hue: '500'
|
|
|
|
specific_text_color: 1,0,0,1
|
2020-08-19 19:33:25 +00:00
|
|
|
right_action_items: [['card-text-outline', partial(root.change_screen, 'feed')], ['pencil-plus-outline', partial(root.change_screen, 'post')], ['message-outline', partial(root.change_screen, 'messages')], ['bell-outline', partial(root.change_screen, 'notifications')], ['account-circle-outline', partial(root.change_screen, 'profile')]]
|
2020-08-09 10:32:42 +00:00
|
|
|
#left_action_items: [[f"assets/fist2.png", partial(root.change_screen, 'feed')]]
|
2020-08-06 12:55:26 +00:00
|
|
|
font_context: None
|
|
|
|
font_name: f'assets/Strengthen.ttf'
|
|
|
|
|
|
|
|
|
2020-08-03 16:29:03 +00:00
|
|
|
ScreenManager:
|
|
|
|
id: scr_mngr
|
2020-08-03 21:20:38 +00:00
|
|
|
# transition: NoTransition()
|
2020-08-06 08:46:51 +00:00
|
|
|
|
|
|
|
LoginScreen:
|
2020-08-11 13:01:48 +00:00
|
|
|
id: login_screen
|
|
|
|
|
2020-08-05 09:15:10 +00:00
|
|
|
FeedScreen:
|
2020-08-11 13:01:48 +00:00
|
|
|
id: feed_screen
|
2020-08-10 19:44:34 +00:00
|
|
|
|
2020-08-17 16:23:40 +00:00
|
|
|
PostScreen:
|
|
|
|
id: post_screen
|
2020-08-10 20:38:00 +00:00
|
|
|
|
2020-08-03 16:29:03 +00:00
|
|
|
MessagesScreen:
|
2020-08-11 13:01:48 +00:00
|
|
|
id: messages_screen
|
|
|
|
|
2020-08-03 16:29:03 +00:00
|
|
|
NotificationsScreen:
|
2020-08-13 07:55:59 +00:00
|
|
|
id: notifications_screen
|
|
|
|
|
|
|
|
ProfileScreen:
|
|
|
|
id: profile_screen
|