URI: 
       treceive.kv - electrum - Electrum Bitcoin wallet
  HTML git clone https://git.parazyd.org/electrum
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
       ---
       treceive.kv (5267B)
       ---
            1 #:import _ electrum.gui.kivy.i18n._
            2 #:import KIVY_GUI_PATH electrum.gui.kivy.KIVY_GUI_PATH
            3 #:import pr_color electrum.invoices.pr_color
            4 #:import PR_UNKNOWN electrum.invoices.PR_UNKNOWN
            5 #:import Factory kivy.factory.Factory
            6 #:import Decimal decimal.Decimal
            7 #:set btc_symbol chr(171)
            8 #:set mbtc_symbol chr(187)
            9 #:set font_light f'{KIVY_GUI_PATH}/data/fonts/Roboto-Condensed.ttf'
           10 
           11 
           12 <RequestLabel@Label>
           13     #color: .305, .309, .309, 1
           14     text_size: self.width, None
           15     halign: 'left'
           16     valign: 'top'
           17 
           18 <RequestItem@CardItem>
           19     address: ''
           20     memo: ''
           21     amount: ''
           22     status_str: ''
           23     status: PR_UNKNOWN
           24     BoxLayout:
           25         spacing: '8dp'
           26         height: '32dp'
           27         orientation: 'vertical'
           28         Widget
           29         RequestLabel:
           30             text: root.memo
           31             shorten: True
           32         Widget
           33         RequestLabel:
           34             text: root.address
           35             color: .699, .699, .699, 1
           36             font_size: '13sp'
           37             shorten: True
           38         Widget
           39     BoxLayout:
           40         spacing: '8dp'
           41         height: '32dp'
           42         orientation: 'vertical'
           43         Widget
           44         RequestLabel:
           45             text: root.amount
           46             halign: 'right'
           47             font_size: '15sp'
           48         Widget
           49         RequestLabel:
           50             text: root.status_str
           51             halign: 'right'
           52             font_size: '13sp'
           53             color: pr_color[root.status]
           54         Widget
           55 
           56 <RequestRecycleView>:
           57     viewclass: 'RequestItem'
           58     RecycleBoxLayout:
           59         default_size: None, dp(56)
           60         default_size_hint: 1, None
           61         size_hint: 1, None
           62         height: self.minimum_height
           63         orientation: 'vertical'
           64 
           65 
           66 <ReceiveScreen>:
           67     id: s
           68     name: 'receive'
           69     address: ''
           70     amount: ''
           71     message: ''
           72     status: ''
           73     is_lightning: False
           74 
           75     BoxLayout
           76         padding: '12dp', '12dp', '12dp', '12dp'
           77         spacing: '12dp'
           78         orientation: 'vertical'
           79 
           80         SendReceiveBlueBottom:
           81             id: blue_bottom
           82             size_hint: 1, None
           83             height: self.minimum_height
           84             BoxLayout:
           85                 size_hint: 1, None
           86                 height: blue_bottom.item_height
           87                 spacing: '5dp'
           88                 Image:
           89                     source: f'atlas://{KIVY_GUI_PATH}/theming/light/lightning' if root.is_lightning else f'atlas://{KIVY_GUI_PATH}/theming/light/globe'
           90                     size_hint: None, None
           91                     size: '22dp', '22dp'
           92                     pos_hint: {'center_y': .5}
           93                 BlueButton:
           94                     id: address_label
           95                     text: _('Lightning') if root.is_lightning else (s.address if s.address else _('Bitcoin Address'))
           96                     shorten: True
           97                     on_release: root.is_lightning = not root.is_lightning if app.wallet.has_lightning() else False
           98             CardSeparator:
           99                 opacity: message_selection.opacity
          100                 color: blue_bottom.foreground_color
          101             BoxLayout:
          102                 size_hint: 1, None
          103                 height: blue_bottom.item_height
          104                 spacing: '5dp'
          105                 Image:
          106                     source: f'atlas://{KIVY_GUI_PATH}/theming/light/calculator'
          107                     opacity: 0.7
          108                     size_hint: None, None
          109                     size: '22dp', '22dp'
          110                     pos_hint: {'center_y': .5}
          111                 BlueButton:
          112                     id: amount_label
          113                     default_text: _('Amount')
          114                     text: s.amount if s.amount else _('Amount')
          115                     on_release: Clock.schedule_once(lambda dt: app.amount_dialog(s, False))
          116             CardSeparator:
          117                 opacity: message_selection.opacity
          118                 color: blue_bottom.foreground_color
          119             BoxLayout:
          120                 id: message_selection
          121                 opacity: 1
          122                 size_hint: 1, None
          123                 height: blue_bottom.item_height
          124                 spacing: '5dp'
          125                 Image:
          126                     source: f'atlas://{KIVY_GUI_PATH}/theming/light/pen'
          127                     size_hint: None, None
          128                     size: '22dp', '22dp'
          129                     pos_hint: {'center_y': .5}
          130                 BlueButton:
          131                     id: description
          132                     text: s.message if s.message else _('Description')
          133                     on_release: Clock.schedule_once(lambda dt: app.description_dialog(s))
          134         BoxLayout:
          135             size_hint: 1, None
          136             height: '48dp'
          137             IconButton:
          138                 icon: f'atlas://{KIVY_GUI_PATH}/theming/light/clock1'
          139                 size_hint: 0.5, None
          140                 height: '48dp'
          141                 on_release: Clock.schedule_once(lambda dt: s.expiration_dialog(s))
          142             Button:
          143                 text: _('Clear')
          144                 size_hint: 1, None
          145                 height: '48dp'
          146                 on_release: Clock.schedule_once(lambda dt: s.clear())
          147             Button:
          148                 text: _('Request')
          149                 size_hint: 1, None
          150                 height: '48dp'
          151                 on_release: Clock.schedule_once(lambda dt: s.new_request(root.is_lightning))
          152         Widget:
          153             size_hint: 1, 0.1
          154         RequestRecycleView:
          155             id: requests_container
          156             scroll_type: ['bars', 'content']
          157             bar_width: '25dp'