Use a different fit mode for tooltips

This commit is contained in:
Antonio Scandurra 2022-06-15 16:44:08 +02:00
parent f2a48c6b02
commit 8a146e49ca
3 changed files with 39 additions and 19 deletions

View file

@ -1,6 +1,6 @@
use super::{
ContainerStyle, Element, ElementBox, Flex, KeystrokeLabel, MouseEventHandler, Overlay,
ParentElement, Text,
OverlayFitMode, ParentElement, Text,
};
use crate::{
fonts::TextStyle,
@ -79,7 +79,7 @@ impl Tooltip {
})
.boxed(),
)
.move_to_fit(true)
.fit_mode(OverlayFitMode::FlipAlignment)
.with_abs_position(state.position.get())
.boxed(),
)