pub struct GlassButtonSpec {
pub style: GlassButtonStyle,
pub size: GlassButtonSize,
pub glass: Option<Glass>,
pub content_color: Option<Color>,
pub icon_backplate: Option<Color>,
}Expand description
Configuration for GlassButton / GlassIconButton.
Fields§
§style: GlassButtonStyle§size: GlassButtonSizeText button sizing; icon buttons use their explicit diameter.
glass: Option<Glass>Overrides the material (advanced).
content_color: Option<Color>Overrides the label/icon color (defaults per style).
icon_backplate: Option<Color>Optional inner color disc for icon buttons. The outer material remains clear glass; the disc colors only the icon’s compact foreground core.
Implementations§
Source§impl GlassButtonSpec
impl GlassButtonSpec
pub fn glass() -> Self
pub fn prominent() -> Self
pub fn plain() -> Self
pub fn destructive() -> Self
pub fn with_glass(self, glass: Glass) -> Self
pub fn with_content_color(self, color: Color) -> Self
Sourcepub fn with_size(self, size: GlassButtonSize) -> Self
pub fn with_size(self, size: GlassButtonSize) -> Self
Sets the label style and padding used by a text button.
pub fn with_icon_backplate(self, color: Color) -> Self
Sourcepub fn content_color(&self, colors: &LiquidColors) -> Color
pub fn content_color(&self, colors: &LiquidColors) -> Color
The label color for this style under colors.
Sourcepub fn icon_color(&self, colors: &LiquidColors) -> Color
pub fn icon_color(&self, colors: &LiquidColors) -> Color
The glyph color for icon buttons: the reference nav/search circles draw BLACK glyphs on plain glass (only prominent tints stay white).
Trait Implementations§
Source§impl Clone for GlassButtonSpec
impl Clone for GlassButtonSpec
Source§impl Debug for GlassButtonSpec
impl Debug for GlassButtonSpec
Source§impl Default for GlassButtonSpec
impl Default for GlassButtonSpec
Source§impl PartialEq for GlassButtonSpec
impl PartialEq for GlassButtonSpec
impl StructuralPartialEq for GlassButtonSpec
Auto Trait Implementations§
impl Freeze for GlassButtonSpec
impl RefUnwindSafe for GlassButtonSpec
impl Send for GlassButtonSpec
impl Sync for GlassButtonSpec
impl Unpin for GlassButtonSpec
impl UnsafeUnpin for GlassButtonSpec
impl UnwindSafe for GlassButtonSpec
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