pub struct IconButtonStyle {
pub bg: Color,
pub radius: f32,
pub icon_size: f32,
pub padding: f32,
}๐Deprecated: use Button::new().child(Icon::new(โฆ)) instead
Expand description
Visual metrics and colors for draw_icon_button.
All dimensions are logical pixels. The default geometry expects a
28 ร 28 logical-pixel rectangle (6 + 16 + 6). Values are used as-is;
this legacy helper does not clamp negative sizes or padding.
ยงExamples
#![allow(deprecated)]
use ailloli_ui_widgets::controls::IconButtonStyle;
let style = IconButtonStyle::default();
assert_eq!(style.icon_size, 16.0);
assert_eq!(style.padding, 6.0);Fieldsยง
ยงbg: Color๐Deprecated: use Button::new().child(Icon::new(โฆ)) instead
Background color of the rounded rectangle.
radius: f32๐Deprecated: use Button::new().child(Icon::new(โฆ)) instead
Corner radius in logical pixels.
icon_size: f32๐Deprecated: use Button::new().child(Icon::new(โฆ)) instead
Width and height of the square icon in logical pixels.
padding: f32๐Deprecated: use Button::new().child(Icon::new(โฆ)) instead
Offset from the rectangleโs top-left corner in logical pixels.
Trait Implementationsยง
Sourceยงimpl Clone for IconButtonStyle
impl Clone for IconButtonStyle
Sourceยงfn clone(&self) -> IconButtonStyle
fn clone(&self) -> IconButtonStyle
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 IconButtonStyle
impl Debug for IconButtonStyle
Sourceยงimpl Default for IconButtonStyle
impl Default for IconButtonStyle
impl Copy for IconButtonStyle
Auto Trait Implementationsยง
impl Freeze for IconButtonStyle
impl RefUnwindSafe for IconButtonStyle
impl Send for IconButtonStyle
impl Sync for IconButtonStyle
impl Unpin for IconButtonStyle
impl UnwindSafe for IconButtonStyle
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.