From 17ddc75afed4ea216211ce1e95220a62fd6bd2d2 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Mon, 4 May 2020 21:54:28 +0200 Subject: [PATCH] Bug fix: tooltip frame size --- emigui/src/containers/frame.rs | 1 - emigui/src/layout.rs | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/emigui/src/containers/frame.rs b/emigui/src/containers/frame.rs index ee478359f..19ed27b3e 100644 --- a/emigui/src/containers/frame.rs +++ b/emigui/src/containers/frame.rs @@ -18,7 +18,6 @@ impl Frame { let mut child_region = region.child_region(inner_rect); add_contents(&mut child_region); - // TODO: handle the last item_spacing in a nicer way let inner_size = child_region.bounding_size(); let inner_size = inner_size.ceil(); // TODO: round to pixel diff --git a/emigui/src/layout.rs b/emigui/src/layout.rs index 7c1cba93d..6022c54e6 100644 --- a/emigui/src/layout.rs +++ b/emigui/src/layout.rs @@ -109,8 +109,7 @@ pub fn show_popup(ctx: &Arc, window_pos: Pos2, add_contents: impl FnOnc // Now insert popup background: - // TODO: handle the last item_spacing in a nicer way - let inner_size = contents_region.bounding_size() - style.item_spacing; + let inner_size = contents_region.bounding_size(); let outer_size = inner_size + 2.0 * window_padding; let rect = Rect::from_min_size(window_pos, outer_size);