workred on identicon issue for android devices

This commit is contained in:
Navjot 2019-09-18 13:14:00 +05:30
parent 6268554b5b
commit af9afcb365
No known key found for this signature in database
GPG Key ID: 9EE70AFD71357F1C
3 changed files with 12 additions and 13 deletions

View File

@ -650,7 +650,7 @@ NavigationLayout:
do_scroll_x: False
BoxLayout:
orientation: 'vertical'
padding: [dp(app.window_size[0]/4*1.1), dp(10)]
padding: [dp(app.window_size[0]/16 if app.window_size[0] <= 720 else app.window_size[0]/4*1.1), dp(10)]
spacing: 12
size_hint_y: None
height: self.minimum_height + dp(app.window_size[1]) if app.window_size[1] > app.window_size[0] else dp(app.window_size[0])

View File

@ -57,9 +57,10 @@ import state
from uikivysignaler import UIkivySignaler
# pylint: disable=unused-argument, too-few-public-methods, import-error
if platform == 'linux':
import identiconGeneration
import identiconGeneration
import os
from kivy.core.clipboard import Clipboard
# pylint: disable=unused-argument, too-few-public-methods
def toast(text):
@ -1028,8 +1029,7 @@ class NavigateApp(App): # pylint: disable=too-many-public-methods
def getCurrentAccountData(self, text):
"""Get Current Address Account Data."""
if platform == 'linux':
self.set_identicon(text)
self.set_identicon(text)
address_label = self.current_address_label(
BMConfigParser().get(text, 'label'), text)
self.root_window.children[1].ids.toolbar.title = address_label
@ -1089,10 +1089,9 @@ class NavigateApp(App): # pylint: disable=too-many-public-methods
def getDefaultAccData(self):
"""Getting Default Account Data."""
if BMConfigParser().addresses():
if platform == 'linux':
img = identiconGeneration.generate(BMConfigParser().addresses()[0])
self.createFolder('./images/default_identicon/')
img.texture.save('./images/default_identicon/{}.png'.format(BMConfigParser().addresses()[0]))
img = identiconGeneration.generate(BMConfigParser().addresses()[0])
self.createFolder('./images/default_identicon/')
img.texture.save('./images/default_identicon/{}.png'.format(BMConfigParser().addresses()[0]))
return BMConfigParser().addresses()[0]
return 'Select Address'
@ -1109,8 +1108,7 @@ class NavigateApp(App): # pylint: disable=too-many-public-methods
def get_default_image():
"""Getting default image on address"""
if BMConfigParser().addresses():
if platform == 'linux':
return './images/default_identicon/{}.png'.format(BMConfigParser().addresses()[0])
return './images/default_identicon/{}.png'.format(BMConfigParser().addresses()[0])
return ''
@staticmethod

View File

@ -44,7 +44,8 @@ requirements =
bitmsghash,
kivymd,
kivy-garden,
qrcode
qrcode,
Pillow
# (str) Custom source folders for requirements
# Sets custom source for any requirements with recipes