pub struct TooltipStyle {
pub bg: Color,
pub fg: Color,
pub radius: f32,
pub pad_x: f32,
pub pad_y: f32,
pub font_px: u16,
pub max_width: f32,
}Expand description
Tooltip palette, padding, typography, and wrap bound.
All floating dimensions are logical pixels. Values pass through without
clamping; callers should provide finite non-negative padding, radius, and
maximum width. font_px is an integer logical-pixel size.
§Examples
use ailloli_ui_widgets::overlay::TooltipStyle;
let style = TooltipStyle::default();
assert_eq!(style.font_px, 12);
assert_eq!(style.max_width, 280.0);Fields§
§bg: ColorBubble fill.
fg: ColorGlyph fill.
radius: f32Bubble corner radius in logical pixels.
pad_x: f32Horizontal text inset in logical pixels.
pad_y: f32Vertical text inset in logical pixels.
font_px: u16Font size in integer logical pixels.
max_width: f32Maximum shaped line width in logical pixels.
Trait Implementations§
Source§impl Clone for TooltipStyle
impl Clone for TooltipStyle
Source§fn clone(&self) -> TooltipStyle
fn clone(&self) -> TooltipStyle
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TooltipStyle
impl Debug for TooltipStyle
Source§impl Default for TooltipStyle
Supplies the dark tooltip defaults.
impl Default for TooltipStyle
Supplies the dark tooltip defaults.
Source§impl PartialEq for TooltipStyle
impl PartialEq for TooltipStyle
impl Copy for TooltipStyle
impl StructuralPartialEq for TooltipStyle
Auto Trait Implementations§
impl Freeze for TooltipStyle
impl RefUnwindSafe for TooltipStyle
impl Send for TooltipStyle
impl Sync for TooltipStyle
impl Unpin for TooltipStyle
impl UnwindSafe for TooltipStyle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.