tkivy: add camera as IconButton - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit fe2fdfe400593ca57522df89ee589e7c1b4427e8 DIR parent a2ea8db9989ecc8acce26702891cda5f70f66255 HTML Author: ThomasV <thomasv@electrum.org> Date: Mon, 8 Feb 2016 11:06:45 +0100 kivy: add camera as IconButton Diffstat: M gui/kivy/main.kv | 15 +++++++++++++++ M gui/kivy/main_window.py | 2 ++ M gui/kivy/theming/light-0.png | 0 M gui/kivy/theming/light.atlas | 4 ++-- A gui/kivy/theming/light/camera.png | 0 M gui/kivy/uix/dialogs/create_restor… | 4 ++-- M gui/kivy/uix/ui_screens/send.kv | 11 +++++------ 7 files changed, 26 insertions(+), 10 deletions(-) --- DIR diff --git a/gui/kivy/main.kv b/gui/kivy/main.kv t@@ -37,6 +37,21 @@ size_hint: 1, None height: self.minimum_height + + +<IconButton@Button>: + icon: '' + AnchorLayout: + pos: self.parent.pos + size: self.parent.size + orientation: 'lr-tb' + Image: + source: self.parent.parent.icon + size_hint_x: None + size: '30dp', '30dp' + + + ######################### # Dialogs ######################### DIR diff --git a/gui/kivy/main_window.py b/gui/kivy/main_window.py t@@ -269,6 +269,8 @@ class ElectrumWindow(App): self.switch_to('receive') def scan_qr(self, on_complete): + if platform != 'android': + return from jnius import autoclass from android import activity PythonActivity = autoclass('org.renpy.android.PythonActivity') DIR diff --git a/gui/kivy/theming/light-0.png b/gui/kivy/theming/light-0.png Binary files differ. DIR diff --git a/gui/kivy/theming/light.atlas b/gui/kivy/theming/light.atlas t@@ -1 +1 @@ parazyd.org:70 /git/electrum/commit/fe2fdfe400593ca57522df89ee589e7c1b4427e8.gph:63: line too long