From 86674507e1d0e104363b5f80e13a2f888e17087d Mon Sep 17 00:00:00 2001 From: Arnaud Ferraris Date: Tue, 27 Jun 2023 13:51:53 +0200 Subject: [PATCH] src: popover: fix build with newer gtk-rs `gtk-rs` v0.16+ no longer exposes the internal fields of the `gtk::Rectangle` struct, mandating the use of the `new()` function instead. Part-of: --- src/popover.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/popover.rs b/src/popover.rs index 8f4e4a5f..2a506d83 100644 --- a/src/popover.rs +++ b/src/popover.rs @@ -305,12 +305,12 @@ pub fn show( #[cfg(not(feature = "glib_v0_14"))] let menu = gtk::Popover::new_from_model(Some(&window), &model); - menu.set_pointing_to(>k::Rectangle { - x: position.x.ceil() as i32, - y: position.y.ceil() as i32, - width: position.width.floor() as i32, - height: position.width.floor() as i32, - }); + menu.set_pointing_to(>k::Rectangle::new ( + position.x.ceil() as i32, + position.y.ceil() as i32, + position.width.floor() as i32, + position.width.floor() as i32, + )); menu.set_constrain_to(gtk::PopoverConstraint::None); let action_group = gio::SimpleActionGroup::new();