blob: ed2073a3a4473b479918f80cb7f1828a00bebf43 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
use iced::widget::{container, text, tooltip};
use iced::Element;
pub mod tip {
pub use super::tooltip::Position;
}
pub fn tip<'a, Message: 'a>(
target: impl Into<Element<'a, Message>>,
tip: &'a str,
position: tip::Position,
) -> Element<'a, Message> {
tooltip(
target,
container(text(tip).size(14))
.padding(5)
.style(container::rounded_box),
position,
)
.into()
}
|