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/comrad/app/screens/post/post.kv

299 lines
7.3 KiB
Plaintext

#:import PostScreen screens.post.post.PostScreen
#:import COLOR_TEXT main.COLOR_TEXT
#:import COLOR_CARD main.COLOR_CARD
#:import COLOR_ACCENT main.COLOR_CARD
#:import COLOR_INACTIVE main.COLOR_INACTIVE
#:import COLOR_ACTIVE main.COLOR_ACTIVE
<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'
<Item>:
# on_release: self.change_title(self.text)
size_hint:1,None
height:'100sp'
ImageLeftWidget:
source: root.source
<AddresseeButton>:
size_hint: 1,None
height:'100sp'
<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,0
size_hint:None,None
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: 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}
<PostScreen>:
name: 'post'
id: post_screen
<ChannelLayout>:
adaptive_width: True
adaptive_height: True
height: self.minimum_height
width: self.minimum_width
size_hint: None,None
# height:'10sp'
# adaptive_height: True
size_hint:1,None
# md_bg_color: 1,1,0,1
spacing:0,0
padding:0,0,0,0
orientation: 'lr-tb'
<SenderMenuItem>:
on_release: self.change_variable(self.text)
<AuthorDropdown>:
id: drop_item
pos_hint: {'center_x': .5, 'center_y': .5}
# text: 'Item'
#items: ['@'+key for key in app.keys]
font_name: 'assets/font.otf'
#on_release: self.set_item("New Item")
<ChannelChip>
# size_hint: None, None
id: 'channelchip'
height: "26sp"
padding: 0, 0, 0, 0
# text: ""
md_bg_color: rgb(*COLOR_CARD)
on_release: self.callback()
icon: 'check-box-outline'
line_color: rgb(*COLOR_CARD)
color: rgb(*COLOR_CARD)
theme_text_color: 'Custom'
text_color: rgb(*COLOR_TEXT)
# pos_hint: {'center_x':0.5}
size_hint: None,None
# MDBoxLayout:
# id: box_check
# adaptive_size: True
# pos_hint: {'center_y': .5}
# padding: dp(0)
# size_hint:None,None
# MDBoxLayout:
# id: chiplayout
# adaptive_width: True
# width: self.minimum_width
# size_hint:None,None
# padding: dp(0)
# # MDIconButton:
# # id: icon
# # icon: root.icon
# # size_hint_y: None
# # height: "26dp"
# # pos_hint: {"center_y": .5}
# # user_font_size: "12dp"
# # disabled: True
# # md_bg_color_disabled: 0, 0, 0, 0
# # theme_text_color: "Custom"
# # text_color: rgb(*COLOR_TEXT)
# # size_hint:None,None
# # width: "26dp"
# Label:
# id: label
# text: root.label
# size_hint_x: None
# width: self.texture_size[0]
# color: root.text_color if root.text_color else (root.theme_cls.text_color)
# font_name: "assets/font.otf"
# font_size: "12sp"
# halign:"left"
# size_hint:None,None
# FloatLayout:
# MDFlatButton:
# text: "ALERT DIALOG"
# pos_hint: {'center_x': .5, 'center_y': .5}
# on_release: app.show_simple_dialog()
<SelectPopup>:
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}