2
0
mirror of https://github.com/ComradCollective/Comrad synced 2024-11-09 13:10:44 +00:00
Comrad/app/screens/post/post.kv
2020-08-21 15:04:27 +01:00

158 lines
4.0 KiB
Plaintext

#:import PostScreen screens.post.post.PostScreen
#:import COLOR_TEXT main.COLOR_TEXT
<AddPostTextField>
id: post_content_input
hint_text: "word?"
required: False
# write_tab: False
multiline: True
helper_text_mode: "on_error"
helper_text: "word?"
color_mode: 'custom'
# size_hint_y:0.5
size_hint: (1,None)
# size: ('300dp','300dp')
pos_hint: {'center_x': 0.5}
line_color_focus: rgb(*COLOR_TEXT)
line_color_normal: rgb(*COLOR_TEXT)
current_hint_text_color: rgb(*COLOR_TEXT)
# max_text_length: 1000
# mode:'fill'
font_size:'23dp'
# font_style:'H5'
<ButtonLayout>:
id: buttonbox
# size_hint_y: None
adaptive_width: True
height: '56dp'
spacing: '10dp'
pos_hint: {'center_x': .5, 'y':0.05}
# md_bg_color: 1,1,0,1
<UploadButton>:
id: file_chooser_button
text: "upload"
#text: app.root.ids.scr_mngr.etc
on_release: self.screen.choose()
#app.register(username.text, password.text)
theme_text_color: "Custom"
text_color: rgb(*COLOR_TEXT)
md_bg_color: 0,0,0,1
font_size: '28sp'
# fill:rgb(*COLOR_TEXT)
font_name: 'assets/overpass-mono-regular.otf'
<PostButton>:
text: "post"
on_release: self.screen.post() #self.post_content_input.text, file_chooser_button.selection)
theme_text_color: "Custom"
text_color: rgb(*COLOR_TEXT)
md_bg_color: 0,0,0,1
font_size: '28sp'
# fill:rgb(*COLOR_TEXT)
font_name: 'assets/overpass-mono-regular.otf'
<PostStatus>:
id: post_status
text:"" #self.add_post_screen.post_id
size_hint:(None,None)
md_bg_color:0,0,0,1
pos_hint:{'center_x':.5, 'y':0.1}
text_color: rgb(*COLOR_TEXT)
md_bg_color: 0,0,0,1
font_size: '25sp'
# fill:rgb(*COLOR_TEXT)
font_name: 'assets/overpass-mono-regular.otf'
<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: 0,0,0,1
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
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: 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}
<PostScreen>:
name: 'post'
id: post_screen