You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Comrad/client/root.kv

103 lines
2.6 KiB
Plaintext

#: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
#:include screens/profile/profile.kv
#:import get_color_from_hex kivy.utils.get_color_from_hex
#:import images_path kivymd.images_path
#:import colors kivymd.color_definitions.colors
#:import partial functools.partial
#:import NoTransition kivy.uix.screenmanager.NoTransition
# :import MDCarousel kivymd.uix.carousel.MDCarousel
## 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)
# pos_hint: {'center_y': 0.5}
halign: 'center'
height: self.texture_size[1]
font_name: 'assets/font.otf'
size_hint:1,None
### LAYOUT
MyLayout:
scr_mngr: scr_mngr
orientation: 'vertical'
height: self.minimum_height
md_bg_color:0,0,0,1
canvas:
Color:
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'])
Rectangle:
pos: self.pos
size: self.size
source: 'assets/bg.png'
# texture: app.texture
MDToolbar:
id: toolbar
title: app.title
pos_hint: {'center_x': .5, 'center_y': 0.95}
md_bg_color: 0.1,0.1,0.1,1
background_palette: 'Red'
background_hue: '500'
specific_text_color: 1,0,0,1
right_action_items: [['post-outline', partial(root.change_screen, 'feed')], ['pencil-plus-outline', partial(root.change_screen, 'post')], ['message-processing-outline', partial(root.change_screen, 'messages')], ['bell-outline', partial(root.change_screen, 'notifications')], ['account-circle-outline', partial(root.change_screen, 'profile')]]
#left_action_items: [[f"assets/fist2.png", partial(root.change_screen, 'feed')]]
font_context: None
font_name: f'assets/Strengthen.ttf'
ScreenManager:
id: scr_mngr
# transition: NoTransition()
LoginScreen:
id: login_screen
FeedScreen:
id: feed_screen
PostScreen:
id: post_screen
MessagesScreen:
id: messages_screen
NotificationsScreen:
id: notifications_screen
ProfileScreen:
id: profile_screen