Skip to main content

HoverTooltipStyle

Struct HoverTooltipStyle 

Source
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: Color

Background fill color of the tooltip surface.

§border_color: Color

Border stroke color of the tooltip surface.

§text_color: Color

Foreground color of the tooltip text.

§shadow_color: Color

Drop shadow color beneath the tooltip surface (alpha 0 disables the shadow).

§font_size: f32

Font size in logical pixels.

§line_height: f32

Line-height multiplier relative to font_size.

§padding_x: f32

Horizontal inner padding in logical pixels.

§padding_y: f32

Vertical inner padding in logical pixels.

§corner_radius: f32

Corner border radius in logical pixels.

§border_width: f32

Border thickness in logical pixels (0.0 disables the border).

§max_width: f32

Maximum text wrapping width in logical pixels.

§cursor_offset_x: f32

Horizontal offset from the pointer anchor in logical pixels.

§cursor_offset_y: f32

Vertical offset from the pointer anchor in logical pixels.

Implementations§

Source§

impl HoverTooltipStyle

Source

pub const fn with_background_color(self, color: Color) -> Self

Overrides the tooltip background fill color.

Source

pub const fn with_border_color(self, color: Color) -> Self

Overrides the tooltip border stroke color.

Source

pub const fn with_text_color(self, color: Color) -> Self

Overrides the tooltip text foreground color.

Source

pub const fn with_shadow_color(self, color: Color) -> Self

Overrides the tooltip drop-shadow color (use alpha 0 to disable shadow).

Source

pub const fn with_font_size(self, font_size: f32) -> Self

Overrides the tooltip font size in logical pixels.

Source

pub const fn with_padding(self, padding_x: f32, padding_y: f32) -> Self

Overrides the horizontal and vertical inner padding in logical pixels.

Source

pub const fn with_corner_radius(self, corner_radius: f32) -> Self

Overrides the tooltip corner radius in logical pixels.

Source

pub const fn with_border_width(self, border_width: f32) -> Self

Overrides the tooltip border width in logical pixels (0.0 disables border).

Source

pub const fn with_max_width(self, max_width: f32) -> Self

Overrides the maximum wrapping width in logical pixels.

Source

pub const fn with_cursor_offset(self, x: f32, y: f32) -> Self

Overrides the cursor anchor offset (x, y) in logical pixels.

Trait Implementations§

Source§

impl Clone for HoverTooltipStyle

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for HoverTooltipStyle

Source§

impl Debug for HoverTooltipStyle

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for HoverTooltipStyle

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for HoverTooltipStyle

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for HoverTooltipStyle

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoInitialState<T> for T

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,