1
0

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

This commit is contained in:
SomberNight
2021-04-30 16:44:32 +02:00
parent 0a56404f28
commit ef3293ab6a
18 changed files with 44 additions and 45 deletions

5
.gitignore vendored
View File

@@ -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/

View File

@@ -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

View File

@@ -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>:

View File

@@ -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

View File

View File

@@ -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')

View File

@@ -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()

View File

@@ -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'

View File

@@ -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)

View File

@@ -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

View File

@@ -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()

View File

@@ -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

View File

@@ -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()

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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))

View File

@@ -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