imagePage: Correctly align right-click menu

Before it was incorrectly centered
This commit is contained in:
Huan Nguyen 2023-05-21 16:03:13 +00:00 • committed by Sophie Herold
parent 5c5aea286f
commit 0ddecefe01

View file

@ -190,6 +190,11 @@ impl LpImagePage {
let rect = gdk::Rectangle::new(x as i32, y as i32, 0, 0);
if self.direction() == gtk::TextDirection::Rtl {
imp.popover.set_halign(gtk::Align::End);
} else {
imp.popover.set_halign(gtk::Align::Start);
}
imp.popover.set_pointing_to(Some(&rect));
imp.popover.popup();
}