uzor_core/widgets/overlay/
theme.rs1pub trait OverlayTheme {
5 fn tooltip_padding(&self) -> f64;
6 fn tooltip_max_width(&self) -> f64;
7 fn background_color(&self) -> &str;
8 fn text_color(&self) -> &str;
9 fn border_color(&self) -> &str;
10 fn shadow_color(&self) -> &str;
11 fn border_width(&self) -> f64;
12 fn shadow_blur(&self) -> f64;
13 fn shadow_offset(&self) -> (f64, f64);
14 fn fade_in_duration_ms(&self) -> u32;
15 fn hover_delay_ms(&self) -> u32;
16}
17
18pub struct DefaultOverlayTheme;
20
21impl DefaultOverlayTheme {
22 pub fn new() -> Self {
23 Self
24 }
25}
26
27impl Default for DefaultOverlayTheme {
28 fn default() -> Self {
29 Self::new()
30 }
31}
32
33impl OverlayTheme for DefaultOverlayTheme {
34 fn tooltip_padding(&self) -> f64 { 8.0 }
35 fn tooltip_max_width(&self) -> f64 { 200.0 }
36 fn background_color(&self) -> &str { "#323232" }
37 fn text_color(&self) -> &str { "#ffffff" }
38 fn border_color(&self) -> &str { "#505050" }
39 fn shadow_color(&self) -> &str { "#00000080" }
40 fn border_width(&self) -> f64 { 1.0 }
41 fn shadow_blur(&self) -> f64 { 4.0 }
42 fn shadow_offset(&self) -> (f64, f64) { (0.0, 2.0) }
43 fn fade_in_duration_ms(&self) -> u32 { 200 }
44 fn hover_delay_ms(&self) -> u32 { 300 }
45}