LBRY-Vault/electrum/gui/kivy/uix/ui_screens/history.kv

96 lines
2.6 KiB
Text

#:import _ electrum.gui.kivy.i18n._
#:import Factory kivy.factory.Factory
#:set font_light 'electrum/gui/kivy/data/fonts/Roboto-Condensed.ttf'
#:set btc_symbol chr(171)
#:set mbtc_symbol chr(187)
<CardLabel@Label>
color: .7, .7, .7, 1
text_size: self.width, None
#height: self.texture_size[1]
halign: 'left'
valign: 'top'
<HistoryItem@CardItem>
icon: 'atlas://electrum/gui/kivy/theming/light/important'
message: ''
fee_text: ''
is_mine: True
amount: '--'
amount_color: '#FF6657' if self.is_mine else '#2EA442'
confirmations: 0
date: ''
quote_text: ''
amount_str: self.quote_text if app.is_fiat else self.amount
unit_str: app.fx.ccy if app.is_fiat else app.base_unit
Image:
id: icon
source: root.icon
size_hint: None, 1
allow_stretch: True
width: self.height*1.5
mipmap: True
BoxLayout:
spacing: '8dp'
height: '32dp'
orientation: 'vertical'
Widget
CardLabel:
color: 0.95, 0.95, 0.95, 1
text: root.message
shorten: True
shorten_from: 'right'
font_size: '15sp'
Widget
CardLabel:
font_size: '12sp'
shorten: True
text: root.date
Widget
BoxLayout:
spacing: '8dp'
height: '32dp'
orientation: 'vertical'
Widget
CardLabel:
text: u'[color={color}]{s}[/color]'.format(s=root.amount_str, color=root.amount_color) + ' ' + '[size=12sp]' + root.unit_str + '[/size]'
halign: 'right'
font_size: '15sp'
Widget
CardLabel:
text: root.fee_text
halign: 'right'
font_size: '12sp'
Widget
<HistoryRecycleView>:
viewclass: 'HistoryItem'
RecycleBoxLayout:
default_size: None, dp(56)
default_size_hint: 1, None
size_hint: 1, None
height: self.minimum_height
orientation: 'vertical'
HistoryScreen:
name: 'history'
content: history_container
BoxLayout:
orientation: 'vertical'
Button:
background_color: 0, 0, 0, 0
text: app.fiat_balance if app.is_fiat else app.balance
markup: True
color: .9, .9, .9, 1
font_size: '30dp'
bold: True
size_hint: 1, 0.25
on_release: app.is_fiat = not app.is_fiat if app.fx.is_enabled() else False
HistoryRecycleView:
id: history_container
scroll_type: ['bars', 'content']
bar_width: '25dp'