Define highlight on click logic in `Cell`
parent
1f608b2498
commit
3fd01c42f2
|
@ -64,25 +64,29 @@ _kv = (f'''
|
||||||
|
|
||||||
<Cell>
|
<Cell>
|
||||||
font_size: 21
|
font_size: 21
|
||||||
|
|
||||||
# make text wrap to botom
|
# make text wrap to botom
|
||||||
text_size: self.size
|
text_size: self.size
|
||||||
halign: 'center'
|
halign: 'center'
|
||||||
valign: 'middle'
|
valign: 'middle'
|
||||||
size: self.texture_size
|
size: self.texture_size
|
||||||
|
|
||||||
|
# don't set these as the update loop already does it
|
||||||
# color: {colorcode('gray')}
|
# color: {colorcode('gray')}
|
||||||
# font_color: {colorcode('gray')}
|
# font_color: {colorcode('gray')}
|
||||||
# font_name: 'Hack-Regular'
|
# font_name: 'Hack-Regular'
|
||||||
# by default transparent; use row color
|
|
||||||
# if `highlight` is set use i3
|
# if `highlight` is set use i3 color by default transparent; use row color
|
||||||
background_color: {_i3_rgba} if self.click_toggle else [0]*4
|
# this is currently used for expiry cells on the options chain
|
||||||
# background_color: {_cell_rgba}
|
background_color: {_i3_rgba} if self.click_toggle else {_black_rgba}
|
||||||
|
# must be set to allow 'plain bg colors' since default texture is grey
|
||||||
|
# background_normal: ''
|
||||||
# spacing: 0, 0
|
# spacing: 0, 0
|
||||||
# padding: [0]*4
|
# padding: 3, 3
|
||||||
|
|
||||||
|
|
||||||
<HeaderCell>
|
<HeaderCell>
|
||||||
font_size: 21
|
font_size: 21
|
||||||
background_color: [0]*4 # by default transparent; use row color
|
|
||||||
# background_color: {_cell_rgba}
|
|
||||||
# canvas.before:
|
# canvas.before:
|
||||||
# Color:
|
# Color:
|
||||||
# rgba: [0.13]*4
|
# rgba: [0.13]*4
|
||||||
|
@ -93,6 +97,7 @@ _kv = (f'''
|
||||||
# # border: [0, {_bs} , 0, {_bs}]
|
# # border: [0, {_bs} , 0, {_bs}]
|
||||||
# border: [0, {_bs} , 0, 0]
|
# border: [0, {_bs} , 0, 0]
|
||||||
|
|
||||||
|
|
||||||
<TickerTable>
|
<TickerTable>
|
||||||
spacing: [{_bs}]
|
spacing: [{_bs}]
|
||||||
# row_force_default: True
|
# row_force_default: True
|
||||||
|
@ -102,15 +107,16 @@ _kv = (f'''
|
||||||
Color:
|
Color:
|
||||||
# i3 style gray as background
|
# i3 style gray as background
|
||||||
rgba: {_i3_rgba}
|
rgba: {_i3_rgba}
|
||||||
# rgba: {_cell_rgba}
|
|
||||||
Rectangle:
|
Rectangle:
|
||||||
# scale with container self here refers to the widget i.e BoxLayout
|
# scale with container self here refers to the widget i.e BoxLayout
|
||||||
pos: self.pos
|
pos: self.pos
|
||||||
size: self.size
|
size: self.size
|
||||||
|
|
||||||
|
|
||||||
<BidAskLayout>
|
<BidAskLayout>
|
||||||
spacing: [{_bs}, 0]
|
spacing: [{_bs}, 0]
|
||||||
|
|
||||||
|
|
||||||
<Row>
|
<Row>
|
||||||
# minimum_height: 200 # should be pulled from Cell text size
|
# minimum_height: 200 # should be pulled from Cell text size
|
||||||
# minimum_width: 200
|
# minimum_width: 200
|
||||||
|
@ -120,7 +126,6 @@ _kv = (f'''
|
||||||
spacing: [0]
|
spacing: [0]
|
||||||
canvas.before:
|
canvas.before:
|
||||||
Color:
|
Color:
|
||||||
# rgba: [0]*4
|
|
||||||
rgba: {_cell_rgba}
|
rgba: {_cell_rgba}
|
||||||
Rectangle:
|
Rectangle:
|
||||||
# self here refers to the widget i.e Row(GridLayout)
|
# self here refers to the widget i.e Row(GridLayout)
|
||||||
|
@ -136,7 +141,6 @@ _kv = (f'''
|
||||||
# radius: (0,)
|
# radius: (0,)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# part of the `PagerView`
|
# part of the `PagerView`
|
||||||
<SearchBar>
|
<SearchBar>
|
||||||
size_hint: 1, None
|
size_hint: 1, None
|
||||||
|
|
Loading…
Reference in New Issue