pub struct ButtonRecipe {
pub shape: ShapeRecipe,
pub fill: PerStateRecipe<FillRecipe>,
pub border: PerStateRecipe<BorderRecipe>,
pub shadow: PerStateRecipe<Option<ShadowRecipe>>,
pub padding: EdgeInsets,
pub min_size: Size,
}Expand description
Tier-2 paint-recipe for one variant of Button. The default
crate::styles::ButtonStyle impl shipped in teksilo-widgets
(RecipeButtonStyle) holds a HashMap<ButtonVariant, ButtonRecipe>
and looks up the recipe at paint time.
Custom ButtonStyle impls can ignore recipes entirely (paint a
glassmorphism gradient, run their own canvas code, etc.); the
recipe layer is the default surface, not an obligation.
Fields§
§shape: ShapeRecipe§fill: PerStateRecipe<FillRecipe>§border: PerStateRecipe<BorderRecipe>§shadow: PerStateRecipe<Option<ShadowRecipe>>§padding: EdgeInsets§min_size: SizeTrait Implementations§
Source§impl Clone for ButtonRecipe
impl Clone for ButtonRecipe
Source§fn clone(&self) -> ButtonRecipe
fn clone(&self) -> ButtonRecipe
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 ButtonRecipe
impl Debug for ButtonRecipe
Source§impl<'de> Deserialize<'de> for ButtonRecipe
impl<'de> Deserialize<'de> for ButtonRecipe
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ButtonRecipe
impl PartialEq for ButtonRecipe
Source§impl Serialize for ButtonRecipe
impl Serialize for ButtonRecipe
impl StructuralPartialEq for ButtonRecipe
Auto Trait Implementations§
impl Freeze for ButtonRecipe
impl RefUnwindSafe for ButtonRecipe
impl Send for ButtonRecipe
impl Sync for ButtonRecipe
impl Unpin for ButtonRecipe
impl UnsafeUnpin for ButtonRecipe
impl UnwindSafe for ButtonRecipe
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