File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -170,7 +170,9 @@ def _initialize_styles(self):
170170 utility .SYSTEM_STYLE_SHEET_PATH , Gtk .STYLE_PROVIDER_PRIORITY_APPLICATION
171171 )
172172 utility .load_css_file (
173- utility .CUSTOM_STYLE_SHEET_PATH , Gtk .STYLE_PROVIDER_PRIORITY_USER
173+ utility .CUSTOM_STYLE_SHEET_PATH ,
174+ Gtk .STYLE_PROVIDER_PRIORITY_USER ,
175+ required = False ,
174176 )
175177
176178 def _retry_errored_plugins (self ):
Original file line number Diff line number Diff line change @@ -388,7 +388,12 @@ def sha256sum(filename):
388388 return h .hexdigest ()
389389
390390
391- def load_css_file (style_sheet_path , priority ):
391+ def load_css_file (style_sheet_path , priority , required = True ):
392+ if not os .path .isfile (style_sheet_path ):
393+ if required :
394+ logging .warning ("Failed loading required stylesheet" )
395+ return
396+
392397 css_provider = Gtk .CssProvider ()
393398 css_provider .load_from_path (style_sheet_path )
394399
You can’t perform that action at this time.
0 commit comments