From 34c66caac5617a5b65e4e46d994c1ecd823e1bad Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Tue, 27 Feb 2024 10:03:44 -0700 Subject: [PATCH] Round popup position --- src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index c771b60..993d34e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2213,10 +2213,11 @@ impl Application for App { text_box = text_box.line_numbers(); } let mut popover = widget::popover(text_box); - if let Some(position) = tab.context_menu { + if let Some(point) = tab.context_menu { + let rounded = Point::new(point.x.round(), point.y.round()); popover = popover .popup(menu::context_menu(&self.key_binds, tab_id)) - .position(position); + .position(rounded); } tab_column = tab_column.push(popover); if !status.is_empty() {