use adw::gdk::Display; use gtk4 as gtk; use std::path::Path; use gtk::{ style_context_add_provider_for_display, CssProvider, STYLE_PROVIDER_PRIORITY_APPLICATION, }; pub fn load_css() { let style_provider = CssProvider::new(); style_provider.load_from_path(Path::new("./src/view/styles/info_bar.css")); style_context_add_provider_for_display( &Display::default().expect("Could not connect to a display"), &style_provider, STYLE_PROVIDER_PRIORITY_APPLICATION, ); }