pub struct ChromeStyle {
pub radius: f32,
pub tint_alpha: u8,
pub glow_intensity: f32,
pub glow_layers: u32,
pub border_width: f32,
}Expand description
Look of a glass card: corner radius, glass-fill strength, and the edge glow.
Fields§
§radius: f32Corner radius of the card, px.
tint_alpha: u8Glass-fill alpha over the panel colour (0..=255) when transparency is
allowed. 0 paints no fill (just an edge).
glow_intensity: f32Edge-glow intensity ∈[0,1] handed to glow_rect. 0 = no glow.
glow_layers: u32Edge-glow layer count (more = softer/heavier).
border_width: f32Border stroke width, px (0 = no border).
Implementations§
Source§impl ChromeStyle
impl ChromeStyle
Sourcepub fn for_policy(self, policy: EffectsPolicy) -> Self
pub fn for_policy(self, policy: EffectsPolicy) -> Self
Soften the chrome for an EffectsPolicy: Full keeps the full look,
Reduced drops the decorative glow (keeps the glass tint + border), None
strips both (the opaque-card fallback is handled in fill_shape/edge).
Trait Implementations§
Source§impl Clone for ChromeStyle
impl Clone for ChromeStyle
Source§fn clone(&self) -> ChromeStyle
fn clone(&self) -> ChromeStyle
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 moreimpl Copy for ChromeStyle
Source§impl Debug for ChromeStyle
impl Debug for ChromeStyle
Source§impl Default for ChromeStyle
impl Default for ChromeStyle
Source§impl PartialEq for ChromeStyle
impl PartialEq for ChromeStyle
impl StructuralPartialEq for ChromeStyle
Auto Trait Implementations§
impl Freeze for ChromeStyle
impl RefUnwindSafe for ChromeStyle
impl Send for ChromeStyle
impl Sync for ChromeStyle
impl Unpin for ChromeStyle
impl UnsafeUnpin for ChromeStyle
impl UnwindSafe for ChromeStyle
Blanket Implementations§
impl<T> Allocation for T
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