From 47cb0e0acb68e0674a1bfeff0c782764eabb9858 Mon Sep 17 00:00:00 2001 From: Sophie Herold Date: Sun, 28 Jan 2024 14:13:52 +0100 Subject: [PATCH] SlidingView: Stop using gtk_widget_get_allocation It got deprecated. Hopefully "width" does what we need. --- src/widgets/sliding_view.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/widgets/sliding_view.rs b/src/widgets/sliding_view.rs index 6e0fafc..44d6fc4 100644 --- a/src/widgets/sliding_view.rs +++ b/src/widgets/sliding_view.rs @@ -276,9 +276,7 @@ mod imp { fn distance(&self) -> f64 { let obj = self.obj(); - // TODO: Fix deprecation - #[allow(deprecated)] - let width = obj.allocation().width(); + let width = obj.width(); width as f64 + self.page_spacing(width) as f64 }