From 61926598ce96bee00aafe5340af4a905759b122a Mon Sep 17 00:00:00 2001 From: pml68 Date: Sat, 11 Jan 2025 01:50:16 +0100 Subject: refactor: remove iced_drop & workspace --- src/widget.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/widget.rs (limited to 'src/widget.rs') diff --git a/src/widget.rs b/src/widget.rs new file mode 100644 index 0000000..ed2073a --- /dev/null +++ b/src/widget.rs @@ -0,0 +1,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>, + tip: &'a str, + position: tip::Position, +) -> Element<'a, Message> { + tooltip( + target, + container(text(tip).size(14)) + .padding(5) + .style(container::rounded_box), + position, + ) + .into() +} -- cgit v1.2.3