mirror of
https://github.com/ComradCollective/Comrad
synced 2024-11-01 21:40:32 +00:00
202 lines
5.0 KiB
Plaintext
202 lines
5.0 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
|
|
#:import rgb main.rgb
|
|
#:import COLOR_BG main.COLOR_BG
|
|
#:import BG_IMG main.BG_IMG
|
|
#:import COLOR_TEXT main.COLOR_TEXT
|
|
|
|
|
|
## 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: rgb(*COLOR_TEXT)
|
|
# pos_hint: {'center_y': 0.5}
|
|
halign: 'center'
|
|
height: self.texture_size[1]
|
|
font_name: 'assets/font.otf'
|
|
size_hint:1,None
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<ProgressPopup>:
|
|
type: "custom"
|
|
size_hint: (None, None)
|
|
size: ('200dp','200dp')
|
|
# md_bg_color: 0,0,0,1
|
|
|
|
MDBoxLayout:
|
|
id: popup_box_layout
|
|
size_hint:(1,1)
|
|
orientation: 'vertical'
|
|
cols:1
|
|
md_bg_color: rgb(*COLOR_ACCENT)
|
|
spacing:'0dp'
|
|
padding:'0dp'
|
|
# radius:[20,]
|
|
# border_radius:20
|
|
canvas:
|
|
Color:
|
|
rgb: rgb(*COLOR_TEXT)
|
|
Line:
|
|
width: 1
|
|
rectangle: (self.x, self.y, self.width, self.height)
|
|
# radius:[20,]
|
|
# border_radius:20
|
|
|
|
|
|
MDLabel:
|
|
size_hint:(None,None)
|
|
# id: progress_label
|
|
text: ''
|
|
halign: 'center'
|
|
theme_text_color: 'Custom'
|
|
text_color: rgb(*COLOR_TEXT)
|
|
font_size: '18dp'
|
|
font_name: 'assets/overpass-mono-regular.otf'
|
|
pos_hint: {'center_x': .5, 'center_y': 0.5}
|
|
|
|
|
|
MDSpinner:
|
|
size_hint: None, None
|
|
size: '46dp','46dp'
|
|
pos_hint: {'center_x': .5, 'center_y': 0.5}
|
|
active: True
|
|
color:rgb(*COLOR_TEXT)
|
|
|
|
<MessagePopup>:
|
|
type: "custom"
|
|
size_hint: None,None
|
|
size: ('300dp','300dp')
|
|
# md_bg_color: 0,0,0,1
|
|
|
|
MDBoxLayout:
|
|
id: msg_popup_box_layout
|
|
size_hint:(1,1)
|
|
orientation: 'vertical'
|
|
cols:1
|
|
md_bg_color: 0,0,0,1
|
|
spacing:'0dp'
|
|
padding:'0dp'
|
|
pos_hint: {'center_x':0.5, 'center_y':0.5}
|
|
# radius:[20,]
|
|
# border_radius:20
|
|
|
|
|
|
|
|
MDLabel:
|
|
# size_hint:(None,None)
|
|
id: msg_label
|
|
text: ''
|
|
halign: 'center'
|
|
# valign: 'middle'
|
|
theme_text_color: 'Custom'
|
|
text_color: rgb(*COLOR_TEXT)
|
|
font_size: '18dp'
|
|
font_name: 'assets/overpass-mono-regular.otf'
|
|
pos_hint: {'center_x': .5, 'y': 0}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
### LAYOUT
|
|
|
|
MyLayout:
|
|
scr_mngr: scr_mngr
|
|
orientation: 'vertical'
|
|
height: self.minimum_height
|
|
md_bg_color:self.rgb(*COLOR_BG)
|
|
|
|
canvas:
|
|
# Color:
|
|
# rgba: 1,1,1,1 #0.925,0.925,0.925,0.19 #get_color_from_hex(colors['Gray']['900'])
|
|
# # rgba: 0.1,0.1,0.1,1 #get_color_from_hex(colors['Gray']['900'])
|
|
|
|
|
|
# Rectangle:
|
|
# pos: self.pos
|
|
# size: self.size
|
|
# source: BG_IMG
|
|
# # texture: app.texture
|
|
|
|
|
|
MyToolbar:
|
|
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'
|
|
theme_text_color:'Custom'
|
|
background_hue: '500'
|
|
right_action_items: [['account-circle-outline', partial(root.change_screen, 'profile')],['card-text', partial(root.change_screen_from_uri, '/inbox/world')],['message-outline', partial(root.change_screen, 'messages')],['pencil-plus-outline', partial(root.change_screen, 'post')],['exit-run', partial(root.change_screen, 'login')]]
|
|
#left_action_items: [[f"assets/fist2.png", partial(root.change_screen, 'feed')]]
|
|
|
|
# ['bell-outline', partial(root.change_screen, 'login')]
|
|
font_context: None
|
|
font_name: f'assets/Strengthen.ttf'
|
|
# canvas:
|
|
# Color:
|
|
# rgb: rgb(67,92,61)
|
|
# Line:
|
|
# width: 1
|
|
# rectangle: (self.x, self.y, self.width, self.height)
|
|
|
|
|
|
|
|
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 |