pub struct StyledButton { /* private fields */ }Implementations§
Source§impl StyledButton
impl StyledButton
pub fn new(text: impl Into<WidgetText>) -> Self
pub fn image(self, img: Image<'static>) -> Self
Sourcepub fn font(self, font: FontId) -> Self
pub fn font(self, font: FontId) -> Self
Set the font (family + size) used to render the button label.
Overrides SharedStyle::font_size when both are set.
Source§impl StyledButton
impl StyledButton
pub fn bg(self, color: Color32) -> Self
pub fn hover_bg(self, color: Color32) -> Self
pub fn active_bg(self, color: Color32) -> Self
pub fn focus_bg(self, color: Color32) -> Self
pub fn text_color(self, color: Color32) -> Self
pub fn font_size(self, size: f32) -> Self
pub fn border(self, width: f32, color: Color32) -> Self
pub fn hover_border(self, width: f32, color: Color32) -> Self
pub fn focus_border(self, width: f32, color: Color32) -> Self
pub fn corner_radius(self, corner_radius: impl Into<CornerRadius>) -> Self
pub fn padding(self, padding: impl Into<Margin>) -> Self
pub fn margin_top(self, val: f32) -> Self
pub fn margin_bottom(self, val: f32) -> Self
pub fn margin_left(self, val: f32) -> Self
pub fn margin_right(self, val: f32) -> Self
pub fn full_width(self) -> Self
pub fn min_width(self, width: f32) -> Self
pub fn max_width(self, width: f32) -> Self
pub fn min_height(self, height: f32) -> Self
pub fn max_height(self, height: f32) -> Self
pub fn cursor(self, icon: CursorIcon) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StyledButton
impl RefUnwindSafe for StyledButton
impl Send for StyledButton
impl Sync for StyledButton
impl Unpin for StyledButton
impl UnsafeUnpin for StyledButton
impl UnwindSafe for StyledButton
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