pub struct HoverTooltipStyle {Show 13 fields
pub background_color: Color,
pub border_color: Color,
pub text_color: Color,
pub shadow_color: Color,
pub font_size: f32,
pub line_height: f32,
pub padding_x: f32,
pub padding_y: f32,
pub corner_radius: f32,
pub border_width: f32,
pub max_width: f32,
pub cursor_offset_x: f32,
pub cursor_offset_y: f32,
}Expand description
Visual styling and positioning configuration for native hover tooltips
(title and button/image alt attributes).
Fields§
§background_color: ColorBackground fill color of the tooltip surface.
border_color: ColorBorder stroke color of the tooltip surface.
text_color: ColorForeground color of the tooltip text.
shadow_color: ColorDrop shadow color beneath the tooltip surface (alpha 0 disables the shadow).
font_size: f32Font size in logical pixels.
line_height: f32Line-height multiplier relative to font_size.
padding_x: f32Horizontal inner padding in logical pixels.
padding_y: f32Vertical inner padding in logical pixels.
corner_radius: f32Corner border radius in logical pixels.
border_width: f32Border thickness in logical pixels (0.0 disables the border).
max_width: f32Maximum text wrapping width in logical pixels.
cursor_offset_x: f32Horizontal offset from the pointer anchor in logical pixels.
cursor_offset_y: f32Vertical offset from the pointer anchor in logical pixels.
Implementations§
Source§impl HoverTooltipStyle
impl HoverTooltipStyle
Sourcepub const fn with_background_color(self, color: Color) -> Self
pub const fn with_background_color(self, color: Color) -> Self
Overrides the tooltip background fill color.
Sourcepub const fn with_border_color(self, color: Color) -> Self
pub const fn with_border_color(self, color: Color) -> Self
Overrides the tooltip border stroke color.
Sourcepub const fn with_text_color(self, color: Color) -> Self
pub const fn with_text_color(self, color: Color) -> Self
Overrides the tooltip text foreground color.
Sourcepub const fn with_shadow_color(self, color: Color) -> Self
pub const fn with_shadow_color(self, color: Color) -> Self
Overrides the tooltip drop-shadow color (use alpha 0 to disable shadow).
Sourcepub const fn with_font_size(self, font_size: f32) -> Self
pub const fn with_font_size(self, font_size: f32) -> Self
Overrides the tooltip font size in logical pixels.
Sourcepub const fn with_padding(self, padding_x: f32, padding_y: f32) -> Self
pub const fn with_padding(self, padding_x: f32, padding_y: f32) -> Self
Overrides the horizontal and vertical inner padding in logical pixels.
Sourcepub const fn with_corner_radius(self, corner_radius: f32) -> Self
pub const fn with_corner_radius(self, corner_radius: f32) -> Self
Overrides the tooltip corner radius in logical pixels.
Sourcepub const fn with_border_width(self, border_width: f32) -> Self
pub const fn with_border_width(self, border_width: f32) -> Self
Overrides the tooltip border width in logical pixels (0.0 disables border).
Sourcepub const fn with_max_width(self, max_width: f32) -> Self
pub const fn with_max_width(self, max_width: f32) -> Self
Overrides the maximum wrapping width in logical pixels.
Sourcepub const fn with_cursor_offset(self, x: f32, y: f32) -> Self
pub const fn with_cursor_offset(self, x: f32, y: f32) -> Self
Overrides the cursor anchor offset (x, y) in logical pixels.