Browse Source

kivy: relocate atlas so it can be made a submodule later

patch-4
SomberNight 4 years ago
parent
commit
ef3293ab6a
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 5
      .gitignore
  2. 2
      contrib/android/Makefile
  3. 10
      electrum/gui/kivy/main.kv
  4. 6
      electrum/gui/kivy/main_window.py
  5. 0
      electrum/gui/kivy/theming/atlas/.gitkeep
  6. 10
      electrum/gui/kivy/uix/dialogs/installwizard.py
  7. 4
      electrum/gui/kivy/uix/dialogs/invoice_dialog.py
  8. 4
      electrum/gui/kivy/uix/dialogs/label_dialog.py
  9. 8
      electrum/gui/kivy/uix/dialogs/lightning_open_channel.py
  10. 4
      electrum/gui/kivy/uix/dialogs/password_dialog.py
  11. 2
      electrum/gui/kivy/uix/dialogs/qr_dialog.py
  12. 2
      electrum/gui/kivy/uix/dialogs/qr_scanner.py
  13. 4
      electrum/gui/kivy/uix/dialogs/request_dialog.py
  14. 2
      electrum/gui/kivy/uix/dialogs/tx_dialog.py
  15. 4
      electrum/gui/kivy/uix/screens.py
  16. 2
      electrum/gui/kivy/uix/ui_screens/history.kv
  17. 8
      electrum/gui/kivy/uix/ui_screens/receive.kv
  18. 12
      electrum/gui/kivy/uix/ui_screens/send.kv

5
.gitignore

@ -20,9 +20,8 @@ electrum_data
.DS_Store
# icons
electrum/gui/kivy/theming/light-0.png
electrum/gui/kivy/theming/light-1.png
electrum/gui/kivy/theming/light.atlas
electrum/gui/kivy/theming/atlas/*.png
electrum/gui/kivy/theming/atlas/*.atlas
# tests/tox
.tox/

2
contrib/android/Makefile

@ -6,7 +6,7 @@ PYTHON = python3
theming:
#bash -c 'for i in network lightning; do convert -background none theming/light/$i.{svg,png}; done'
$(PYTHON) -m kivy.atlas ../../electrum/gui/kivy/theming/light 1024 ../../electrum/gui/kivy/theming/light/*.png
$(PYTHON) -m kivy.atlas ../../electrum/gui/kivy/theming/atlas/light 1024 ../../electrum/gui/kivy/theming/light/*.png
prepare:
# running pre build setup
@cp buildozer.spec ../../buildozer.spec

10
electrum/gui/kivy/main.kv

@ -233,7 +233,7 @@
Color:
rgba: 0.192, .498, 0.745, 1
BorderImage:
source: f'atlas://{KIVY_GUI_PATH}/theming/light/card_bottom'
source: f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/card_bottom'
size: self.size
pos: self.pos
@ -247,7 +247,7 @@
Color:
rgba: 0.192, .498, 0.745, 1
BorderImage:
source: f'atlas://{KIVY_GUI_PATH}/theming/light/card_bottom'
source: f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/card_bottom'
size: self.size
pos: self.pos
@ -260,7 +260,7 @@
Color:
rgba: 0.192, .498, 0.745, 1
BorderImage:
source: f'atlas://{KIVY_GUI_PATH}/theming/light/card_bottom'
source: f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/card_bottom'
size: self.size
pos: self.pos
@ -348,8 +348,8 @@
valign: 'middle'
bold: True
font_size: '12.5sp'
background_normal: f'atlas://{KIVY_GUI_PATH}/theming/light/tab_btn'
background_down: f'atlas://{KIVY_GUI_PATH}/theming/light/tab_btn_pressed'
background_normal: f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/tab_btn'
background_down: f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/tab_btn_pressed'
<ColoredLabel@Label>:

6
electrum/gui/kivy/main_window.py

@ -1028,7 +1028,7 @@ class ElectrumWindow(App, Logger):
self.qr_dialog(label.name, label.data, show_text_with_qr)
def show_error(self, error, width='200dp', pos=None, arrow_pos=None,
exit=False, icon=f'atlas://{KIVY_GUI_PATH}/theming/light/error', duration=0,
exit=False, icon=f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/error', duration=0,
modal=False):
''' Show an error Message Bubble.
'''
@ -1040,7 +1040,7 @@ class ElectrumWindow(App, Logger):
exit=False, duration=0, modal=False):
''' Show an Info Message Bubble.
'''
self.show_error(error, icon=f'atlas://{KIVY_GUI_PATH}/theming/light/important',
self.show_error(error, icon=f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/important',
duration=duration, modal=modal, exit=exit, pos=pos,
arrow_pos=arrow_pos)
@ -1081,7 +1081,7 @@ class ElectrumWindow(App, Logger):
info_bubble.show_arrow = False
img.allow_stretch = True
info_bubble.dim_background = True
info_bubble.background_image = f'atlas://{KIVY_GUI_PATH}/theming/light/card'
info_bubble.background_image = f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/card'
else:
info_bubble.fs = False
info_bubble.icon = icon

0
electrum/gui/kivy/theming/atlas/.gitkeep

10
electrum/gui/kivy/uix/dialogs/installwizard.py

@ -44,8 +44,8 @@ Builder.load_string('''
background_color: (1, 1, 1, 1) if self.focus else (0.454, 0.698, 0.909, 1)
foreground_color: (0.31, 0.31, 0.31, 1) if self.focus else (0.835, 0.909, 0.972, 1)
hint_text_color: self.foreground_color
background_active: f'atlas://{KIVY_GUI_PATH}/theming/light/create_act_text_active'
background_normal: f'atlas://{KIVY_GUI_PATH}/theming/light/create_act_text_active'
background_active: f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/create_act_text_active'
background_normal: f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/create_act_text_active'
size_hint_y: None
height: '48sp'
@ -313,7 +313,7 @@ Builder.load_string('''
font_size: '18dp'
text_size: self.width - dp(24), self.height - dp(12)
color: .1, .1, .1, 1
background_normal: f'atlas://{KIVY_GUI_PATH}/theming/light/white_bg_round_top'
background_normal: f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/white_bg_round_top'
background_down: self.background_normal
size_hint_y: None
@ -341,7 +341,7 @@ Builder.load_string('''
height: '30dp'
width: '30dp'
size_hint: 1, None
icon: f'atlas://{KIVY_GUI_PATH}/theming/light/gear'
icon: f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/gear'
on_release:
root.options_dialog() if root.options_dialog else None
@ -475,7 +475,7 @@ Builder.load_string('''
id: scan
height: '48sp'
on_release: root.scan_xpub()
icon: f'atlas://{KIVY_GUI_PATH}/theming/light/camera'
icon: f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/camera'
size_hint: 1, None
WizardButton:
text: _('Paste')

4
electrum/gui/kivy/uix/dialogs/invoice_dialog.py

@ -70,12 +70,12 @@ Builder.load_string('''
text: _('Delete')
on_release: root.delete_dialog()
IconButton:
icon: f'atlas://{KIVY_GUI_PATH}/theming/light/copy'
icon: f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/copy'
size_hint: 0.5, None
height: '48dp'
on_release: root.copy_to_clipboard()
IconButton:
icon: f'atlas://{KIVY_GUI_PATH}/theming/light/share'
icon: f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/share'
size_hint: 0.5, None
height: '48dp'
on_release: root.do_share()

4
electrum/gui/kivy/uix/dialogs/label_dialog.py

@ -23,8 +23,8 @@ Builder.load_string('''
pos_hint: {'center_y':.5}
text:''
multiline: False
background_normal: f'atlas://{KIVY_GUI_PATH}/theming/light/tab_btn'
background_active: f'atlas://{KIVY_GUI_PATH}/theming/light/textinput_active'
background_normal: f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/tab_btn'
background_active: f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/textinput_active'
hint_text_color: self.foreground_color
foreground_color: 1, 1, 1, 1
font_size: '16dp'

8
electrum/gui/kivy/uix/dialogs/lightning_open_channel.py

@ -45,7 +45,7 @@ Builder.load_string('''
size_hint: 1, None
height: blue_bottom.item_height
Image:
source: f'atlas://{KIVY_GUI_PATH}/theming/light/globe'
source: f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/globe'
size_hint: None, None
size: '22dp', '22dp'
pos_hint: {'center_y': .5}
@ -59,7 +59,7 @@ Builder.load_string('''
size_hint: 1, None
height: blue_bottom.item_height
Image:
source: f'atlas://{KIVY_GUI_PATH}/theming/light/calculator'
source: f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/calculator'
size_hint: None, None
size: '22dp', '22dp'
pos_hint: {'center_y': .5}
@ -72,13 +72,13 @@ Builder.load_string('''
size_hint: 1, None
height: '48dp'
IconButton:
icon: f'atlas://{KIVY_GUI_PATH}/theming/light/copy'
icon: f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/copy'
size_hint: 0.5, None
height: '48dp'
on_release: s.do_paste()
disabled: not app.use_gossip
IconButton:
icon: f'atlas://{KIVY_GUI_PATH}/theming/light/camera'
icon: f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/camera'
size_hint: 0.5, None
height: '48dp'
on_release: app.scan_qr(on_complete=s.on_qr)

4
electrum/gui/kivy/uix/dialogs/password_dialog.py

@ -51,7 +51,7 @@ Builder.load_string('''
IconButton:
size_hint: 0.15, None
height: '40dp'
icon: f'atlas://{KIVY_GUI_PATH}/theming/light/btn_create_account'
icon: f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/btn_create_account'
on_release: root.select_file()
disabled: root.hide_wallet_label or root.is_change
opacity: 0 if root.hide_wallet_label or root.is_change else 1
@ -85,7 +85,7 @@ Builder.load_string('''
IconButton:
height: '40dp'
size_hint: 0.15, None
icon: f'atlas://{KIVY_GUI_PATH}/theming/light/eye1'
icon: f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/eye1'
icon_size: '40dp'
on_release:
textinput_generic_password.password = False if textinput_generic_password.password else True

2
electrum/gui/kivy/uix/dialogs/qr_dialog.py

@ -50,7 +50,7 @@ Builder.load_string('''
on_release:
root.copy_to_clipboard()
IconButton:
icon: f'atlas://{KIVY_GUI_PATH}/theming/light/share'
icon: f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/share'
size_hint: 0.6, None
height: '48dp'
on_release: root.do_share()

2
electrum/gui/kivy/uix/dialogs/qr_scanner.py

@ -35,7 +35,7 @@ Builder.load_string('''
#separator_color: .89, .89, .89, 1
#separator_height: '1.2dp'
#title_color: .437, .437, .437, 1
#background: f'atlas://{KIVY_GUI_PATH}/theming/light/dialog'
#background: f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/dialog'
on_activate:
qrscr.start()
qrscr.size = self.size

4
electrum/gui/kivy/uix/dialogs/request_dialog.py

@ -69,12 +69,12 @@ Builder.load_string('''
text: _('Delete')
on_release: root.delete_dialog()
IconButton:
icon: f'atlas://{KIVY_GUI_PATH}/theming/light/copy'
icon: f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/copy'
size_hint: 0.5, None
height: '48dp'
on_release: root.copy_to_clipboard()
IconButton:
icon: f'atlas://{KIVY_GUI_PATH}/theming/light/share'
icon: f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/share'
size_hint: 0.5, None
height: '48dp'
on_release: root.do_share()

2
electrum/gui/kivy/uix/dialogs/tx_dialog.py

@ -102,7 +102,7 @@ Builder.load_string('''
IconButton:
size_hint: 0.5, None
height: '48dp'
icon: f'atlas://{KIVY_GUI_PATH}/theming/light/qrcode'
icon: f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/qrcode'
on_release: root.show_qr()
Button:
size_hint: 0.5, None

4
electrum/gui/kivy/uix/screens.py

@ -131,7 +131,7 @@ class HistoryScreen(CScreen):
if is_lightning:
status = 0
status_str = 'unconfirmed' if timestamp is None else format_time(int(timestamp))
icon = f'atlas://{KIVY_GUI_PATH}/theming/light/lightning'
icon = f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/lightning'
message = tx_item['label']
fee_msat = tx_item['fee_msat']
fee = int(fee_msat/1000) if fee_msat else None
@ -143,7 +143,7 @@ class HistoryScreen(CScreen):
conf=tx_item['confirmations'],
timestamp=tx_item['timestamp'])
status, status_str = self.app.wallet.get_tx_status(tx_hash, tx_mined_info)
icon = f'atlas://{KIVY_GUI_PATH}/theming/light/' + TX_ICONS[status]
icon = f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/' + TX_ICONS[status]
message = tx_item['label'] or tx_hash
fee = tx_item['fee_sat']
fee_text = '' if fee is None else 'fee: %d sat'%fee

2
electrum/gui/kivy/uix/ui_screens/history.kv

@ -16,7 +16,7 @@
<HistoryItem@CardItem>
icon: f'atlas://{KIVY_GUI_PATH}/theming/light/important'
icon: f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/important'
message: ''
fee_text: ''
is_mine: True

8
electrum/gui/kivy/uix/ui_screens/receive.kv

@ -86,7 +86,7 @@
height: blue_bottom.item_height
spacing: '5dp'
Image:
source: f'atlas://{KIVY_GUI_PATH}/theming/light/lightning' if root.is_lightning else f'atlas://{KIVY_GUI_PATH}/theming/light/globe'
source: f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/lightning' if root.is_lightning else f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/globe'
size_hint: None, None
size: '22dp', '22dp'
pos_hint: {'center_y': .5}
@ -103,7 +103,7 @@
height: blue_bottom.item_height
spacing: '5dp'
Image:
source: f'atlas://{KIVY_GUI_PATH}/theming/light/calculator'
source: f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/calculator'
opacity: 0.7
size_hint: None, None
size: '22dp', '22dp'
@ -123,7 +123,7 @@
height: blue_bottom.item_height
spacing: '5dp'
Image:
source: f'atlas://{KIVY_GUI_PATH}/theming/light/pen'
source: f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/pen'
size_hint: None, None
size: '22dp', '22dp'
pos_hint: {'center_y': .5}
@ -135,7 +135,7 @@
size_hint: 1, None
height: '48dp'
IconButton:
icon: f'atlas://{KIVY_GUI_PATH}/theming/light/clock1'
icon: f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/clock1'
size_hint: 0.5, None
height: '48dp'
on_release: Clock.schedule_once(lambda dt: s.expiration_dialog(s))

12
electrum/gui/kivy/uix/ui_screens/send.kv

@ -86,7 +86,7 @@
height: blue_bottom.item_height
spacing: '5dp'
Image:
source: f'atlas://{KIVY_GUI_PATH}/theming/light/lightning' if root.is_lightning else f'atlas://{KIVY_GUI_PATH}/theming/light/globe'
source: f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/lightning' if root.is_lightning else f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/globe'
size_hint: None, None
size: '22dp', '22dp'
pos_hint: {'center_y': .5}
@ -103,7 +103,7 @@
height: blue_bottom.item_height
spacing: '5dp'
Image:
source: f'atlas://{KIVY_GUI_PATH}/theming/light/calculator'
source: f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/calculator'
opacity: 0.7
size_hint: None, None
size: '22dp', '22dp'
@ -122,7 +122,7 @@
height: blue_bottom.item_height
spacing: '5dp'
Image:
source: f'atlas://{KIVY_GUI_PATH}/theming/light/pen'
source: f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/pen'
size_hint: None, None
size: '22dp', '22dp'
pos_hint: {'center_y': .5}
@ -137,14 +137,14 @@
IconButton:
size_hint: 0.5, 1
on_release: s.do_save()
icon: f'atlas://{KIVY_GUI_PATH}/theming/light/save'
icon: f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/save'
IconButton:
size_hint: 0.5, 1
on_release: s.do_clear()
icon: f'atlas://{KIVY_GUI_PATH}/theming/light/closebutton'
icon: f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/closebutton'
IconButton:
size_hint: 0.5, 1
icon: f'atlas://{KIVY_GUI_PATH}/theming/light/copy'
icon: f'atlas://{KIVY_GUI_PATH}/theming/atlas/light/copy'
on_release: s.do_paste()
Button:
id: qr

Loading…
Cancel
Save