SlidingView: Stop using gtk_widget_get_allocation

It got deprecated. Hopefully "width" does what we need.
This commit is contained in:
Sophie Herold 2024-01-28 14:13:52 +01:00
parent 0bdc6192ab
commit 47cb0e0acb

View file

@ -276,9 +276,7 @@ mod imp {
fn distance(&self) -> f64 { fn distance(&self) -> f64 {
let obj = self.obj(); let obj = self.obj();
// TODO: Fix deprecation let width = obj.width();
#[allow(deprecated)]
let width = obj.allocation().width();
width as f64 + self.page_spacing(width) as f64 width as f64 + self.page_spacing(width) as f64
} }