1515from kivymd .app import MDApp
1616from kivy .clock import Clock
1717
18+ from kivy .resources import resource_add_path
1819import kivy .properties as prop
1920
2021from lib .py .data_management import DataManagement
@@ -104,9 +105,9 @@ class ElPCD(MDApp):
104105
105106 def __init__ (self , ** kwargs ):
106107 super ().__init__ (** kwargs )
107- ## Load logo image \/
108+ ## Presets \/
109+ self .icon = os .path .join (os .environ ['ELPCD_ROOT' ],'assets' ,'icons' ,'elpcd192x.png' )
108110 self .LOGO = os .path .join (os .environ ["ELPCD_ROOT" ],'assets' ,'gedalogo2020.png' )
109- ## Sets app themming \/
110111 self .theme_cls .primary_palette = "Indigo"
111112 self .theme_cls .accent_palette = "Gray"
112113 ## Sets Sqlite connection and cursor \/
@@ -131,10 +132,9 @@ def set_data_management_widget(self, view_only=True,item_data=None,new_cls=False
131132 self .main_frame .ids .data_frame .add_widget (self .data_management )
132133
133134 def on_start (self ):
134- def dismiss_welcome (* args ):
135- """Switch off of welcome screen"""
136- self .main_frame .switch_to_screen ('pcd' ,duration = 5. )
137- self .welcome_event = Clock .schedule_once (dismiss_welcome ,5 ) ## Switches after 5 seconds
135+ ## Switch off of welcome screen \/
136+ dismiss_welcome = lambda * x : self .main_frame .switch_to_screen ('pcd' ,duration = 5. )
137+ self .welcome_event = Clock .schedule_once (dismiss_welcome ,3 )
138138
139139 def on_stop (self ):
140140 ## Close Sqlite connection \/
@@ -148,11 +148,11 @@ def build(self):
148148if __name__ == "__main__" :
149149
150150 if hasattr (sys , "_MEIPASS" ):
151- from kivy .resources import resource_add_path
152151 os .environ ["ELPCD_ROOT" ] = sys ._MEIPASS
153- resource_add_path (os .environ ["ELPCD_ROOT" ])
154152 else :
155153 os .environ ["ELPCD_ROOT" ] = os .path .dirname (os .path .abspath (__file__ ))
154+
155+ resource_add_path (os .environ ["ELPCD_ROOT" ])
156156
157157 kv_files_dir = os .path .join (os .environ ["ELPCD_ROOT" ],'lib' ,'kv' )
158158 for item in os .listdir (kv_files_dir ):
0 commit comments