history.kv (2689B)
1 #:import _ electrum.gui.kivy.i18n._ 2 #:import KIVY_GUI_PATH electrum.gui.kivy.KIVY_GUI_PATH 3 #:import Factory kivy.factory.Factory 4 #:set font_light f'{KIVY_GUI_PATH}/data/fonts/Roboto-Condensed.ttf' 5 #:set btc_symbol chr(171) 6 #:set mbtc_symbol chr(187) 7 8 9 10 <CardLabel@Label> 11 color: .7, .7, .7, 1 12 text_size: self.width, None 13 #height: self.texture_size[1] 14 halign: 'left' 15 valign: 'top' 16 17 18 <HistoryItem@CardItem> 19 icon: f'atlas://{KIVY_GUI_PATH}/theming/light/important' 20 message: '' 21 fee_text: '' 22 is_mine: True 23 amount: '--' 24 amount_color: '#FF6657' if self.is_mine else '#2EA442' 25 confirmations: 0 26 date: '' 27 quote_text: '' 28 amount_str: self.quote_text if app.is_fiat else self.amount 29 unit_str: app.fx.ccy if app.is_fiat else app.base_unit 30 Image: 31 id: icon 32 source: root.icon 33 size_hint: None, 1 34 allow_stretch: True 35 width: self.height*1.5 36 mipmap: True 37 BoxLayout: 38 spacing: '8dp' 39 height: '32dp' 40 orientation: 'vertical' 41 Widget 42 CardLabel: 43 color: 0.95, 0.95, 0.95, 1 44 text: root.message 45 shorten: True 46 shorten_from: 'right' 47 font_size: '15sp' 48 Widget 49 CardLabel: 50 font_size: '12sp' 51 shorten: True 52 text: root.date 53 Widget 54 BoxLayout: 55 spacing: '8dp' 56 height: '32dp' 57 orientation: 'vertical' 58 Widget 59 CardLabel: 60 text: u'[color={color}]{s}[/color]'.format(s=root.amount_str, color=root.amount_color) + ' ' + '[size=12sp]' + root.unit_str + '[/size]' 61 halign: 'right' 62 font_size: '15sp' 63 Widget 64 CardLabel: 65 text: root.fee_text 66 halign: 'right' 67 font_size: '12sp' 68 Widget 69 70 <HistoryRecycleView>: 71 viewclass: 'HistoryItem' 72 RecycleBoxLayout: 73 default_size: None, dp(56) 74 default_size_hint: 1, None 75 size_hint: 1, None 76 height: self.minimum_height 77 orientation: 'vertical' 78 79 80 <HistoryScreen>: 81 name: 'history' 82 content: history_container 83 BoxLayout: 84 orientation: 'vertical' 85 Button: 86 background_color: 0, 0, 0, 0 87 text: app.fiat_balance if app.is_fiat else app.balance 88 markup: True 89 color: .9, .9, .9, 1 90 font_size: '30dp' 91 bold: True 92 size_hint: 1, 0.25 93 on_release: app.is_fiat = not app.is_fiat if app.fx.is_enabled() else False 94 HistoryRecycleView: 95 id: history_container 96 scroll_type: ['bars', 'content'] 97 bar_width: '25dp'