Changes made after merging new pull request

This commit is contained in:
lakshyacis 2019-08-06 16:31:05 +05:30
parent 9db8635e76
commit c97a8ceffc
No known key found for this signature in database
GPG Key ID: D2C539C8EC63E9EB

View File

@ -45,7 +45,6 @@ from functools import partial
from kivy.uix.carousel import Carousel from kivy.uix.carousel import Carousel
from kivy.utils import platform from kivy.utils import platform
from kivy.uix.spinner import Spinner from kivy.uix.spinner import Spinner
from kivymd.textfields import MDTextField
class Navigatorss(MDNavigationDrawer): class Navigatorss(MDNavigationDrawer):
@ -1087,7 +1086,7 @@ class NavigateApp(App):
return '' return ''
def searchQuery(self, instance): def searchQuery(self, instance):
'''This method is used for showing searched mails''' """Method used for showing searched mails."""
state.search_screen = self.root.ids.scr_mngr.current state.search_screen = self.root.ids.scr_mngr.current
state.searcing_text = str(instance.text).strip() state.searcing_text = str(instance.text).strip()
if state.search_screen == 'inbox': if state.search_screen == 'inbox':
@ -1097,29 +1096,6 @@ class NavigateApp(App):
self.root.ids.sc4.clear_widgets() self.root.ids.sc4.clear_widgets()
self.root.ids.sc4.add_widget(Sent()) self.root.ids.sc4.add_widget(Sent())
self.root.ids.scr_mngr.current = state.search_screen self.root.ids.scr_mngr.current = state.search_screen
# if self.root.ids.search_input.opacity == 0:
# self.root.ids.search_input.opacity = 1
# self.root.ids.search_input.size_hint = 4,None
# # self.root.ids.serch_btn.opacity = 0
# # self.root.ids.serch_btn.disabled = True
# self.root.ids.search_input.disabled = False
# self.root.ids.search_input.focus = True
# self.root.ids.toolbar.left_action_items = []
# self.root.ids.toolbar.title = ''
# self.root.ids.myButton.opacity = 0
# self.root.ids.myButton.disabled = True
# self.root.ids.reset_navbar.opacity = 1
# self.root.ids.reset_navbar.disabled = False
# elif str(text):
# state.search_screen = self.root.ids.scr_mngr.current
# state.searcing_text = str(text).strip()
# if state.search_screen == 'inbox':
# self.root.ids.sc1.clear_widgets()
# self.root.ids.sc1.add_widget(Inbox())
# else:
# self.root.ids.sc4.clear_widgets()
# self.root.ids.sc4.add_widget(Sent())
# self.root.ids.scr_mngr.current = state.search_screen
def reset_navdrawer(self, instance): def reset_navdrawer(self, instance):
"""Method used for reseting navigation drawer.""" """Method used for reseting navigation drawer."""
@ -1146,8 +1122,8 @@ class NavigateApp(App):
"""Method shows search button on inbox and sent screen only.""" """Method shows search button on inbox and sent screen only."""
if instance.text == 'Inbox' or instance.text == 'Sent': if instance.text == 'Inbox' or instance.text == 'Sent':
if not self.root.ids.search_bar.children: if not self.root.ids.search_bar.children:
self.root.ids.search_bar.add_widget(MDIconButton(icon = 'magnify')) self.root.ids.search_bar.add_widget(
# self.root.ids.search_bar.add_widget(MDTextField(id='search_field', hint_text='Search icon', on_text=app.searchQuery(self))) MDIconButton(icon='magnify'))
self.root.ids.serch_btn.opacity = 1 self.root.ids.serch_btn.opacity = 1
self.root.ids.serch_btn.disabled = False self.root.ids.serch_btn.disabled = False
state.searcing_text = '' state.searcing_text = ''
@ -1432,7 +1408,8 @@ class ShowQRCode(Screen):
"""Method used for showing QR Code.""" """Method used for showing QR Code."""
self.ids.qr.clear_widgets() self.ids.qr.clear_widgets()
from kivy.garden.qrcode import QRCodeWidget from kivy.garden.qrcode import QRCodeWidget
self.ids.qr.add_widget(QRCodeWidget(data=self.manager.get_parent_window().children[0].address)) self.ids.qr.add_widget(QRCodeWidget(
data=self.manager.get_parent_window().children[0].address))
class Draft(Screen): class Draft(Screen):
@ -1585,7 +1562,6 @@ def show_search_btn(self):
def hide_search_btn(mgr_objs): def hide_search_btn(mgr_objs):
"""Method used to hide search button and search box.""" """Method used to hide search button and search box."""
mgr_objs.parent.parent.parent.ids.serch_btn.opacity = 0 mgr_objs.parent.parent.parent.ids.serch_btn.opacity = 0
mgr_objs.parent.parent.parent.ids.serch_btn.disabled = True mgr_objs.parent.parent.parent.ids.serch_btn.disabled = True
mgr_objs.parent.parent.parent.ids.search_input.size_hint = 1, None mgr_objs.parent.parent.parent.ids.search_input.size_hint = 1, None
@ -1609,4 +1585,3 @@ class CustomSpinner(Spinner):
super(CustomSpinner, self).__init__(*args, **kwargs) super(CustomSpinner, self).__init__(*args, **kwargs)
max = 2.8 max = 2.8
self.dropdown_cls.max_height = self.height * max + max * 4 self.dropdown_cls.max_height = self.height * max + max * 4
print(args)