2
0
mirror of https://github.com/ComradCollective/Comrad synced 2024-11-09 13:10:44 +00:00
Comrad/komrade/app/screens/feed/feed.kv
quadrismegistus 11667b5aa9 renaming
2020-09-05 16:01:53 +01:00

183 lines
4.0 KiB
Plaintext

#:import FeedScreen screens.feed.feed.FeedScreen
#:import Window kivy.core.window.Window
#:import rgb main.rgb
#:import COLOR_CARD main.COLOR_CARD
#:import COLOR_TEXT main.COLOR_TEXT
#:import COLOR_CARD_BORDER main.COLOR_CARD_BORDER
<FeedScreen>:
name: 'feed'
#MyLabel:
# text: "The falcon cannot hear the falconer..."
Carousel:
id: post_carousel
direction: 'right'
loop: True
<PostTitle>:
id: post_title
text: ''
size_hint_y: None
height: self.texture_size[1]
font_style: 'H5'
halign: 'center'
height: '25'
size_hint_y: None
<PostImageLayout>:
id: image_layout
cols: 1
orientation: 'vertical'
size_hint: (1,None)
# md_bg_color: 1,1,0,1
pos_hint: {'center_x':0.5} #, 'y':0.5}
# height: '100dp' #self.minimum_height
# width: '100dp'
height: '300sp'
# spacing:'100dp'
# padding:'100dp'
<PostImage>:
# height: '25'
# size: self.norm_image_size
id: post_image
allow_stretch: True
# keep_ratio: True
size_hint_y: None
size_hint_x: None
pos_hint: {'center_x':0.5}
size: (self.height*self.image_ratio,self.height)
# width: self.parent.width
# height: self.parent.width/self.image_ratio
# height: self.height
# width: self.height*self.image_ratio
# canvas:
# Color:
# rgb: 0,0,0,1
# Line:
# width: 1
# rectangle: (self.x, self.y, self.width, self.height)
<PostGridLayout>:
cols: 1
size_hint: (1,None)
pos_hint: {'center_x':0.5, 'center_y':0}
md_bg_color: 1,1,0,1
# height: self.minimum_height
<PostAuthorLayout>:
cols: 2
orientation: 'horizontal'
size_hint: (1,None)
# size_hint:(None,None)
# pos_hint:(None,None)
pos_hint: {'center_x':0.5, 'center_y':0}
# md_bg_color: 1,1,0,1
height: '100sp' #self.minimum_height
# radius:[20,]
# border_radius:20
# height: self.minimum_height
<PostAuthorAvatar>:
size_hint:(None,None)
pos_hint:{'center_x':1,'x':1}
height:'100sp'
# padding:'10dp'
# canvas:
# Color:
# rgb: rgb(*COLOR_TEXT)
# Line:
# width: 1
# rectangle: (self.x, self.y, self.width, self.height)
<PostAuthorLabel>:
id: post_author_label
text: ''
pos_hint: {'center_y':0.5, 'center_x':0.5}
# font_size:'100dp'
# font_style:'H5'
# font_style: 'custom'
#font_name: "Strengthen"
# height: '400'
size_hint_y: None
# size_hint_x: 100
text_color:rgb(*COLOR_TEXT)
theme_text_color: 'Custom'
halign: 'left'
padding: ('10dp','0dp')
bold: True
markup: True
# font_size: '24sp'
<PostTimestampLabel>:
id: post_timestamp_label
text: ''
pos_hint: {'center_y':0.5, 'center_x':0.5}
# font_size:'100dp'
# font_style:'H5'
# font_style: 'custom'
#font_name: "Strengthen"
# height: '400'
size_hint_y: None
# size_hint_x: 100
text_color:rgb(*COLOR_TEXT)
theme_text_color: 'Custom'
halign: 'right'
padding: ('10dp','0dp')
<PostContent>:
id: post_content
text: ''
pos_hint: {'center_y':1}
font_size:'13sp'
# font_style:'H5'
#font_name: "Strengthen"
# height: '400'
#size_hint_y: 1
text_color:rgb(*COLOR_TEXT)
theme_text_color: 'Custom'
halign: 'left'
# adaptive_height: True
<PostScrollView>:
size_hint: (1,None)
# pos_hint: {'center_y':0.5}
#size: ('300dp',self.height)
<PostCard>:
id: post
orientation: "vertical"
padding: "20dp"
size_hint: (None, None)
size:('500sp','800sp')
# adaptive_height: True
pos_hint: {"center_x": .5, "center_y": .5}
md_bg_color: rgb(*COLOR_CARD)
height: self.minimum_height
radius:[20,]
border_radius:20
canvas:
Color:
rgba: rgb(*COLOR_CARD_BORDER,a=0.5)
Line:
width: 1
rounded_rectangle: (self.x, self.y, self.width, self.height, 20, 20, 20, 20)