pub struct GlassButtonSpec {
pub style: GlassButtonStyle,
pub glass: Option<Glass>,
pub content_color: Option<Color>,
pub icon_backplate: Option<Color>,
}Expand description
Configuration for GlassButton / GlassIconButton.
Fields§
§style: GlassButtonStyle§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
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§fn clone(&self) -> GlassButtonSpec
fn clone(&self) -> GlassButtonSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 GlassButtonSpec
impl Debug for GlassButtonSpec
Source§impl Default for GlassButtonSpec
impl Default for GlassButtonSpec
Source§fn default() -> GlassButtonSpec
fn default() -> GlassButtonSpec
Returns the “default value” for a type. Read more
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