summaryrefslogtreecommitdiff
path: root/src/widget.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/widget.rs')
-rw-r--r--src/widget.rs18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/widget.rs b/src/widget.rs
index f1eb0f3..859d25e 100644
--- a/src/widget.rs
+++ b/src/widget.rs
@@ -1,5 +1,7 @@
-use iced::Element;
-use iced::widget::{container, text, tooltip};
+use iced::widget::{self, container, text, tooltip};
+use material_theme::Theme;
+
+use crate::types::Element;
pub mod tip {
pub use super::tooltip::Position;
@@ -12,10 +14,16 @@ pub fn tip<'a, Message: 'a>(
) -> Element<'a, Message> {
tooltip(
target,
- container(text(tip).size(14))
- .padding(5)
- .style(container::rounded_box),
+ container(text(tip).size(14)).padding(5).style(|theme| {
+ let base = material_theme::container::surface_container_low(theme);
+ container::Style {
+ border: iced::border::rounded(4),
+ ..base
+ }
+ }),
position,
)
.into()
}
+
+pub type Text<'a> = widget::Text<'a, Theme>;