graphview: use gtk::style_context_add_provider_for_display

gtk::StyleContext::add_provider_for_display is now deprecated
since gtk update to 0.7.2
This commit is contained in:
Stéphane Cerveau 2023-08-26 13:01:08 +02:00
parent 375f083cbf
commit eda453df53

View file

@ -477,7 +477,7 @@ impl GraphView {
// Load CSS from the STYLE variable. // Load CSS from the STYLE variable.
let provider = gtk::CssProvider::new(); let provider = gtk::CssProvider::new();
provider.load_from_data(GRAPHVIEW_STYLE); provider.load_from_data(GRAPHVIEW_STYLE);
gtk::StyleContext::add_provider_for_display( gtk::style_context_add_provider_for_display(
&gtk::gdk::Display::default().expect("Error initializing gtk css provider."), &gtk::gdk::Display::default().expect("Error initializing gtk css provider."),
&provider, &provider,
gtk::STYLE_PROVIDER_PRIORITY_APPLICATION, gtk::STYLE_PROVIDER_PRIORITY_APPLICATION,