2020-08-10 16:37:42 +00:00
|
|
|
#:import FeedScreen screens.feed.feed.FeedScreen
|
2020-08-11 13:01:48 +00:00
|
|
|
#:import Window kivy.core.window.Window
|
2020-08-19 23:26:25 +00:00
|
|
|
#:import rgb main.rgb
|
|
|
|
#:import COLOR_CARD main.COLOR_CARD
|
|
|
|
#:import COLOR_TEXT main.COLOR_TEXT
|
|
|
|
#:import COLOR_CARD_BORDER main.COLOR_CARD_BORDER
|
2020-08-10 16:37:42 +00:00
|
|
|
|
|
|
|
<FeedScreen>:
|
|
|
|
name: 'feed'
|
|
|
|
#MyLabel:
|
|
|
|
# text: "The falcon cannot hear the falconer..."
|
|
|
|
Carousel:
|
|
|
|
id: post_carousel
|
|
|
|
direction: 'right'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<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
|
|
|
|
|
2020-08-11 13:01:48 +00:00
|
|
|
|
|
|
|
<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: '300dp'
|
|
|
|
# spacing:'100dp'
|
|
|
|
# padding:'100dp'
|
|
|
|
|
2020-08-10 16:37:42 +00:00
|
|
|
<PostImage>:
|
|
|
|
# height: '25'
|
2020-08-11 13:01:48 +00:00
|
|
|
# size: self.norm_image_size
|
2020-08-11 13:42:55 +00:00
|
|
|
id: post_image
|
2020-08-11 13:01:48 +00:00
|
|
|
allow_stretch: True
|
|
|
|
# keep_ratio: True
|
|
|
|
|
2020-08-10 16:37:42 +00:00
|
|
|
size_hint_y: None
|
2020-08-11 13:01:48 +00:00
|
|
|
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
|
2020-08-21 07:27:27 +00:00
|
|
|
# canvas:
|
|
|
|
# Color:
|
|
|
|
# rgb: 0,0,0,1
|
|
|
|
# Line:
|
|
|
|
# width: 1
|
|
|
|
# rectangle: (self.x, self.y, self.width, self.height)
|
2020-08-11 13:01:48 +00:00
|
|
|
|
|
|
|
|
2020-08-10 16:37:42 +00:00
|
|
|
|
|
|
|
<PostGridLayout>:
|
|
|
|
cols: 1
|
|
|
|
size_hint: (1,None)
|
|
|
|
pos_hint: {'center_x':0.5, 'center_y':0}
|
|
|
|
md_bg_color: 1,1,0,1
|
2020-08-11 13:01:48 +00:00
|
|
|
# height: self.minimum_height
|
2020-08-10 16:37:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
<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: '100dp' #self.minimum_height
|
|
|
|
# radius:[20,]
|
|
|
|
# border_radius:20
|
2020-08-11 13:01:48 +00:00
|
|
|
|
|
|
|
|
2020-08-10 16:37:42 +00:00
|
|
|
|
|
|
|
<PostAuthorAvatar>:
|
|
|
|
size_hint:(None,None)
|
|
|
|
pos_hint:{'center_x':1,'x':1}
|
|
|
|
# padding:'10dp'
|
|
|
|
# canvas:
|
|
|
|
# Color:
|
2020-08-19 23:26:25 +00:00
|
|
|
# rgb: rgb(*COLOR_TEXT)
|
2020-08-10 16:37:42 +00:00
|
|
|
# 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
|
2020-08-19 23:26:25 +00:00
|
|
|
text_color:rgb(*COLOR_TEXT)
|
2020-08-10 16:37:42 +00:00
|
|
|
theme_text_color: 'Custom'
|
2020-08-21 07:27:27 +00:00
|
|
|
halign: 'right'
|
2020-08-10 16:37:42 +00:00
|
|
|
padding: ('10dp','0dp')
|
2020-08-21 07:27:27 +00:00
|
|
|
bold: True
|
2020-08-10 16:37:42 +00:00
|
|
|
|
2020-08-12 19:23:23 +00:00
|
|
|
<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
|
2020-08-19 23:26:25 +00:00
|
|
|
text_color:rgb(*COLOR_TEXT)
|
2020-08-12 19:23:23 +00:00
|
|
|
theme_text_color: 'Custom'
|
|
|
|
halign: 'right'
|
|
|
|
padding: ('10dp','0dp')
|
|
|
|
|
2020-08-10 16:37:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<PostContent>:
|
|
|
|
id: post_content
|
|
|
|
text: ''
|
|
|
|
pos_hint: {'center_y':1}
|
|
|
|
font_size:'58dp'
|
|
|
|
font_style:'H5'
|
|
|
|
#font_name: "Strengthen"
|
|
|
|
# height: '400'
|
|
|
|
size_hint_y: None
|
2020-08-19 23:26:25 +00:00
|
|
|
text_color:rgb(*COLOR_TEXT)
|
2020-08-10 16:37:42 +00:00
|
|
|
theme_text_color: 'Custom'
|
|
|
|
halign: 'left'
|
2020-08-11 13:01:48 +00:00
|
|
|
|
|
|
|
<PostScrollView>:
|
|
|
|
size_hint: (1,None)
|
|
|
|
# pos_hint: {'center_y':0.5}
|
|
|
|
#size: ('300dp',self.height)
|
2020-08-10 16:37:42 +00:00
|
|
|
|
|
|
|
<PostCard>:
|
|
|
|
id: post
|
|
|
|
orientation: "vertical"
|
|
|
|
padding: "20dp"
|
2020-08-21 07:27:27 +00:00
|
|
|
size_hint: (0.75, None)
|
2020-08-10 16:37:42 +00:00
|
|
|
pos_hint: {"center_x": .5, "center_y": .5}
|
2020-08-19 23:26:25 +00:00
|
|
|
md_bg_color: rgb(*COLOR_CARD)
|
2020-08-10 16:37:42 +00:00
|
|
|
height: self.minimum_height
|
|
|
|
radius:[20,]
|
|
|
|
border_radius:20
|
2020-08-13 17:41:31 +00:00
|
|
|
canvas:
|
|
|
|
Color:
|
2020-08-19 23:26:25 +00:00
|
|
|
rgba: rgb(*COLOR_CARD_BORDER,a=0.5)
|
2020-08-13 17:41:31 +00:00
|
|
|
Line:
|
|
|
|
width: 1
|
|
|
|
rounded_rectangle: (self.x, self.y, self.width, self.height, 20, 20, 20, 20)
|
2020-08-10 16:37:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|