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: <https://gitlab.gnome.org/World/Phosh/squeekboard/-/merge_requests/620>
This commit is contained in:
Arnaud Ferraris
2023-06-27 13:51:53 +02:00
committed by Marge Bot
parent 5bf84c9d03
commit 86674507e1

View File

@ -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(&gtk::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(&gtk::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();