pub struct HoverTooltipStyle {Show 13 fields
pub background_color: Rgba,
pub border_color: Rgba,
pub text_color: Rgba,
pub shadow_color: Rgba,
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: RgbaBackground fill color of the tooltip surface.
border_color: RgbaBorder stroke color of the tooltip surface.
text_color: RgbaForeground color of the tooltip text.
shadow_color: RgbaDrop 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: Rgba) -> HoverTooltipStyle
pub const fn with_background_color(self, color: Rgba) -> HoverTooltipStyle
Overrides the tooltip background fill color.
Sourcepub const fn with_border_color(self, color: Rgba) -> HoverTooltipStyle
pub const fn with_border_color(self, color: Rgba) -> HoverTooltipStyle
Overrides the tooltip border stroke color.
Sourcepub const fn with_text_color(self, color: Rgba) -> HoverTooltipStyle
pub const fn with_text_color(self, color: Rgba) -> HoverTooltipStyle
Overrides the tooltip text foreground color.
Sourcepub const fn with_shadow_color(self, color: Rgba) -> HoverTooltipStyle
pub const fn with_shadow_color(self, color: Rgba) -> HoverTooltipStyle
Overrides the tooltip drop-shadow color (use alpha 0 to disable shadow).
Sourcepub const fn with_font_size(self, font_size: f32) -> HoverTooltipStyle
pub const fn with_font_size(self, font_size: f32) -> HoverTooltipStyle
Overrides the tooltip font size in logical pixels.
Sourcepub const fn with_padding(
self,
padding_x: f32,
padding_y: f32,
) -> HoverTooltipStyle
pub const fn with_padding( self, padding_x: f32, padding_y: f32, ) -> HoverTooltipStyle
Overrides the horizontal and vertical inner padding in logical pixels.
Sourcepub const fn with_corner_radius(self, corner_radius: f32) -> HoverTooltipStyle
pub const fn with_corner_radius(self, corner_radius: f32) -> HoverTooltipStyle
Overrides the tooltip corner radius in logical pixels.
Sourcepub const fn with_border_width(self, border_width: f32) -> HoverTooltipStyle
pub const fn with_border_width(self, border_width: f32) -> HoverTooltipStyle
Overrides the tooltip border width in logical pixels (0.0 disables border).
Sourcepub const fn with_max_width(self, max_width: f32) -> HoverTooltipStyle
pub const fn with_max_width(self, max_width: f32) -> HoverTooltipStyle
Overrides the maximum wrapping width in logical pixels.
Sourcepub const fn with_cursor_offset(self, x: f32, y: f32) -> HoverTooltipStyle
pub const fn with_cursor_offset(self, x: f32, y: f32) -> HoverTooltipStyle
Overrides the cursor anchor offset (x, y) in logical pixels.
Trait Implementations§
Source§impl Clone for HoverTooltipStyle
impl Clone for HoverTooltipStyle
Source§fn clone(&self) -> HoverTooltipStyle
fn clone(&self) -> HoverTooltipStyle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more