print error message if load-styles fails

phoen
Daniel Barlow 2022-03-25 11:00:35 +00:00
parent fcd5aee103
commit 2a004d08df
1 changed files with 8 additions and 6 deletions

View File

@ -12,12 +12,14 @@
(local HEIGHT 48)
(fn load-styles [pathname]
(let [style-provider (Gtk.CssProvider)]
(style-provider:load_from_path pathname)
(Gtk.StyleContext.add_provider_for_screen
(Gdk.Screen.get_default)
style-provider
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)))
(let [style-provider (Gtk.CssProvider)
(success err) (style-provider:load_from_path pathname)]
(if success
(Gtk.StyleContext.add_provider_for_screen
(Gdk.Screen.get_default)
style-provider
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
(print "failed to load stylesheet" err))))
(fn resolve [f]
(match (type f)