diff --git a/dashboard/src/app_window.rs b/dashboard/src/app_window.rs index 2c19600..2460b9e 100644 --- a/dashboard/src/app_window.rs +++ b/dashboard/src/app_window.rs @@ -31,7 +31,9 @@ impl ApplicationWindow { let provider = gtk::CssProvider::new(); provider.load_from_data(&stylesheet); + #[allow(deprecated)] let context = window.style_context(); + #[allow(deprecated)] context.add_provider(&provider, STYLE_PROVIDER_PRIORITY_USER); let layout = gtk::Box::builder() diff --git a/dashboard/src/components/transit_clock.rs b/dashboard/src/components/transit_clock.rs index 44bef09..9968156 100644 --- a/dashboard/src/components/transit_clock.rs +++ b/dashboard/src/components/transit_clock.rs @@ -36,6 +36,7 @@ impl Default for TransitClock { s.set_draw_func({ let s = s.clone(); move |_, context, width, height| { + #[allow(deprecated)] let style_context = WidgetExt::style_context(&s); let center_x = width as f64 / 2.; let center_y = height as f64 / 2.; @@ -45,7 +46,9 @@ impl Default for TransitClock { let sunrise = info.sunrise - NaiveTime::from_hms_opt(0, 0, 0).unwrap(); let sunset = info.sunset - NaiveTime::from_hms_opt(0, 0, 0).unwrap(); + #[allow(deprecated)] let night_color = style_context.lookup_color("dark_5").unwrap(); + #[allow(deprecated)] let day_color = style_context.lookup_color("blue_1").unwrap(); PieChart::new(&style_context) diff --git a/dashboard/src/drawing/pie_chart.rs b/dashboard/src/drawing/pie_chart.rs index d5d3183..facb2c8 100644 --- a/dashboard/src/drawing/pie_chart.rs +++ b/dashboard/src/drawing/pie_chart.rs @@ -1,5 +1,7 @@ use cairo::Context; -use gtk::{gdk::RGBA, prelude::*, StyleContext}; +use gtk::{gdk::RGBA, prelude::*}; +#[allow(deprecated)] +use gtk::StyleContext; use std::f64::consts::PI; #[derive(Clone, Debug)] @@ -27,7 +29,9 @@ pub struct PieChart { } impl PieChart { + #[allow(deprecated)] pub fn new(style_context: &StyleContext) -> Self { + #[allow(deprecated)] Self { rotation: 0., wedges: vec![], diff --git a/gm-control-panel/src/app_window.rs b/gm-control-panel/src/app_window.rs index d4c25b2..1f67f22 100644 --- a/gm-control-panel/src/app_window.rs +++ b/gm-control-panel/src/app_window.rs @@ -31,7 +31,9 @@ impl ApplicationWindow { let provider = gtk::CssProvider::new(); provider.load_from_data(&stylesheet); + #[allow(deprecated)] let context = window.style_context(); + #[allow(deprecated)] context.add_provider(&provider, STYLE_PROVIDER_PRIORITY_USER); let layout = gtk::FlowBox::new();