mirror of
https://github.com/storytold/egui.git
synced 2026-11-22 18:41:52 +01:00
Bug fix: tooltip frame size
This commit is contained in:
1 parent
94645cb918
commit
17ddc75afe
2 files changed
+1
-3
No files matched your search
@@ -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
|
||||
|
||||
|
||||
@@ -109,8 +109,7 @@ pub fn show_popup(ctx: &Arc<Context>, 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);
|
||||
|
||||
Reference in new issue
Block a user