mpybit fixes

This commit is contained in:
lakshyacis 2020-03-18 16:21:18 +05:30
parent 6650876b57
commit c25ef395ad
No known key found for this signature in database
GPG Key ID: D2C539C8EC63E9EB

View File

@ -398,11 +398,10 @@ class MyAddress(Screen):
meny = CustomTwoLineAvatarIconListItem( meny = CustomTwoLineAvatarIconListItem(
text=item['text'], secondary_text=item['secondary_text'], text=item['text'], secondary_text=item['secondary_text'],
theme_text_color='Custom' if is_enable == 'true' else 'Primary', theme_text_color='Custom' if is_enable == 'true' else 'Primary',
text_color=NavigateApp().theme_cls.primary_color, text_color=NavigateApp().theme_cls.primary_color,)
)
try: try:
meny.canvas.children[6].rgba = [0, 0, 0, 0] if is_enable == 'true' else [0.5, 0.5, 0.5, 0.5] meny.canvas.children[6].rgba = [0, 0, 0, 0] if is_enable == 'true' else [0.5, 0.5, 0.5, 0.5]
except Exception as e: except Exception:
meny.canvas.children[9].rgba = [0, 0, 0, 0] if is_enable == 'true' else [0.5, 0.5, 0.5, 0.5] meny.canvas.children[9].rgba = [0, 0, 0, 0] if is_enable == 'true' else [0.5, 0.5, 0.5, 0.5]
meny.add_widget(AvatarSampleWidget( meny.add_widget(AvatarSampleWidget(
source='./images/text_images/{}.png'.format( source='./images/text_images/{}.png'.format(
@ -508,7 +507,7 @@ class MyAddress(Screen):
instance.parent.parent.theme_text_color = 'Primary' instance.parent.parent.theme_text_color = 'Primary'
try: try:
instance.parent.parent.canvas.children[6].rgba = [0.5, 0.5, 0.5, 0.5] instance.parent.parent.canvas.children[6].rgba = [0.5, 0.5, 0.5, 0.5]
except Exception as e: except Exception:
instance.parent.parent.canvas.children[9].rgba = [0.5, 0.5, 0.5, 0.5] instance.parent.parent.canvas.children[9].rgba = [0.5, 0.5, 0.5, 0.5]
toast('Address disabled') toast('Address disabled')
Clock.schedule_once(self.address_permision_callback, 0) Clock.schedule_once(self.address_permision_callback, 0)
@ -520,7 +519,7 @@ class MyAddress(Screen):
instance.parent.parent.theme_text_color = 'Custom' instance.parent.parent.theme_text_color = 'Custom'
try: try:
instance.parent.parent.canvas.children[6].rgba = [0, 0, 0, 0] instance.parent.parent.canvas.children[6].rgba = [0, 0, 0, 0]
except Exception as e: except Exception:
instance.parent.parent.canvas.children[9].rgba = [0, 0, 0, 0] instance.parent.parent.canvas.children[9].rgba = [0, 0, 0, 0]
toast('Address Enabled') toast('Address Enabled')
Clock.schedule_once(self.address_permision_callback, 0) Clock.schedule_once(self.address_permision_callback, 0)
@ -2258,7 +2257,9 @@ class MailDetail(Screen): # pylint: disable=too-many-instance-attributes
time_obj = datetime.fromtimestamp(int(data[0][4])) time_obj = datetime.fromtimestamp(int(data[0][4]))
time_tag = time_obj.strftime("%d %b %Y, %I:%M %p") time_tag = time_obj.strftime("%d %b %Y, %I:%M %p")
sender_name = BMConfigParser().get(data[0][1], 'label') sender_name = BMConfigParser().get(data[0][1], 'label')
composer_obj.body.text = '\n\n ------------------------On '+time_tag+', '+sender_name+' wrote:-----------------------\n' + data[0][3] composer_obj.body.text = (
'\n\n ------------------------On ' + time_tag + ', '
+ sender_name + ' wrote:-----------------------\n' + data[0][3])
composer_obj.body.focus = True composer_obj.body.focus = True
composer_obj.body.cursor = (0, 0) composer_obj.body.cursor = (0, 0)
state.kivyapp.root.ids.sc3.children[1].ids.rv.data = '' state.kivyapp.root.ids.sc3.children[1].ids.rv.data = ''