2
0
mirror of https://github.com/ComradCollective/Comrad synced 2024-11-01 21:40:32 +00:00
Comrad/client/main.kv

77 lines
3.1 KiB
Plaintext
Raw Normal View History

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-03 10:25:58 +00:00
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
canvas:
Color:
2020-08-03 20:44:53 +00:00
rgba: 0.925,0.925,0.925,1 #get_color_from_hex(colors['Gray']['900'])
2020-08-03 16:29:03 +00:00
Rectangle:
pos: self.pos
size: self.size
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
right_action_items: [['radio-tower', partial(root.change_screen, 'feed')], ['account-group', partial(root.change_screen, 'people')], ['calendar', partial(root.change_screen, 'events')], ['message-processing-outline', partial(root.change_screen, 'messages')], ['bell-outline', partial(root.change_screen, 'notifications')]]
left_action_items: [[f"spiral3.png", partial(root.change_screen, 'welcome')]]
ScreenManager:
id: scr_mngr
2020-08-03 21:20:38 +00:00
# transition: NoTransition()
2020-08-03 16:29:03 +00:00
WelcomeScreen:
name: 'welcome'
MyLabel:
text: "Turning and turning in the widening gyre \nThe falcon cannot hear the falconer;\nThings fall apart; the centre cannot hold;\nMere anarchy is loosed upon the world,\nThe blood-dimmed tide is loosed, and everywhere \nThe ceremony of innocence is drowned;\nThe best lack all conviction, while the worst \nAre full of passionate intensity.\n\nSurely some revelation is at hand;\nSurely the Second Coming is at hand. \nThe Second Coming! Hardly are those words out \nWhen a vast image out of Spiritus Mundi\nTroubles my sight: somewhere in sands of the desert \nA shape with lion body and the head of a man, \nA gaze blank and pitiless as the sun, \nIs moving its slow thighs, while all about it \nReel shadows of the indignant desert birds. \nThe darkness drops again; but now I know \nThat twenty centuries of stony sleep\nWere vexed to nightmare by a rocking cradle, \nAnd what rough beast, its hour come round at last, \nSlouches towards Bethlehem to be born?"
FeedScreen:
name: 'feed'
2020-08-03 20:16:30 +00:00
2020-08-03 16:29:03 +00:00
ScrollView:
2020-08-03 20:16:30 +00:00
id: scroll
size_hint: (1, 1)
pos_hint: {'center_x': .5, 'y': 0}
do_scroll_x: False
bar_width: 0
scroll_type: ['content']
2020-08-03 16:29:03 +00:00
MDList:
id: container
2020-08-03 21:20:38 +00:00
# size_hint_y: None
# height: '100dp'
#padding: 0, self._list_vertical_padding
2020-08-03 20:16:30 +00:00
2020-08-03 16:29:03 +00:00
PeopleScreen:
name: 'people'
MyLabel:
text: "The falcon cannot hear the falconer..."
EventsScreen:
name: 'events'
MessagesScreen:
name: 'messages'
NotificationsScreen:
name: 'notifications'