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:
committed by
Marge Bot
parent
5bf84c9d03
commit
86674507e1
@ -305,12 +305,12 @@ pub fn show(
|
|||||||
#[cfg(not(feature = "glib_v0_14"))]
|
#[cfg(not(feature = "glib_v0_14"))]
|
||||||
let menu = gtk::Popover::new_from_model(Some(&window), &model);
|
let menu = gtk::Popover::new_from_model(Some(&window), &model);
|
||||||
|
|
||||||
menu.set_pointing_to(>k::Rectangle {
|
menu.set_pointing_to(>k::Rectangle::new (
|
||||||
x: position.x.ceil() as i32,
|
position.x.ceil() as i32,
|
||||||
y: position.y.ceil() as i32,
|
position.y.ceil() as i32,
|
||||||
width: position.width.floor() as i32,
|
position.width.floor() as i32,
|
||||||
height: position.width.floor() as i32,
|
position.width.floor() as i32,
|
||||||
});
|
));
|
||||||
menu.set_constrain_to(gtk::PopoverConstraint::None);
|
menu.set_constrain_to(gtk::PopoverConstraint::None);
|
||||||
|
|
||||||
let action_group = gio::SimpleActionGroup::new();
|
let action_group = gio::SimpleActionGroup::new();
|
||||||
|
|||||||
Reference in New Issue
Block a user