diff options
| author | pml68 <contact@pml68.dev> | 2025-04-28 10:59:52 +0200 |
|---|---|---|
| committer | pml68 <contact@pml68.dev> | 2025-04-28 23:45:43 +0200 |
| commit | e17ce59fa4c907511f38795c342b2232a7bba26d (patch) | |
| tree | 0bbeddd19696de817a97f2109bae316e3a564f3a /src/widget.rs | |
| parent | feat: switch to modified `iced_fontello` for custom Theme support (diff) | |
| download | iced-builder-e17ce59fa4c907511f38795c342b2232a7bba26d.tar.gz | |
feat: switch to fully custom, Material3-based theme
Diffstat (limited to '')
| -rw-r--r-- | src/widget.rs | 18 |
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>; |
