pub struct ResolvedStyle {Show 17 fields
pub fill: Color,
pub text: Color,
pub border_color: Color,
pub border_width: f32,
pub radius: f32,
pub padding: Bounds,
pub font: FontSpec,
pub opacity: f32,
pub transition_ms: f32,
pub shadow: Option<Shadow>,
pub material: Material,
pub text_case: TextCase,
pub letter_spacing: f32,
pub border_sides: Option<Bounds>,
pub border_dash: Vec<f32>,
pub line_height: f32,
pub gap: Option<f32>,
}Expand description
Estilo final, já com tokens resolvidos, entregue ao controle na pintura.
Fields§
§fill: Color§text: Color§border_color: Color§border_width: f32§radius: f32§padding: Bounds§font: FontSpec§opacity: f32§transition_ms: f32§shadow: Option<Shadow>Sombra desenhada pelo Ui antes do controle (no retângulo dele, com o radius).
material: MaterialFundo desfocado (vidro), feito pelo Ui antes do controle.
text_case: TextCaseMaiúsculas ou minúsculas no texto (os controles de texto aplicam ao desenhar).
letter_spacing: f32Espaço a mais entre as letras.
border_sides: Option<Bounds>A borda de cada lado (None: a border_width em volta toda).
border_dash: Vec<f32>O traço da borda (vazio: contínuo).
line_height: f32A altura da linha em vezes o tamanho da fonte (0: a da fonte).
gap: Option<f32>O espaço entre as partes do controle (None: o dele; StyleProps::gap).
Implementations§
Source§impl ResolvedStyle
impl ResolvedStyle
Sourcepub fn border_stroke(&self, color: Color, width: f32) -> Stroke
pub fn border_stroke(&self, color: Color, width: f32) -> Stroke
O traço da borda do estilo, na cor color e na largura width.
Source§impl ResolvedStyle
impl ResolvedStyle
Sourcepub fn lerp(&self, other: &ResolvedStyle, t: f32) -> ResolvedStyle
pub fn lerp(&self, other: &ResolvedStyle, t: f32) -> ResolvedStyle
Estilo intermediário numa transição (t de 0 a 1). Cores, espessuras, raio e
opacidade são interpolados; fonte e padding mudam direto para os de other.
Trait Implementations§
Source§impl Clone for ResolvedStyle
impl Clone for ResolvedStyle
Source§impl Debug for ResolvedStyle
impl Debug for ResolvedStyle
Source§impl Default for ResolvedStyle
impl Default for ResolvedStyle
Source§impl PartialEq for ResolvedStyle
impl PartialEq for ResolvedStyle
impl StructuralPartialEq for ResolvedStyle
Auto Trait Implementations§
impl Forget for ResolvedStyle
impl Freeze for ResolvedStyle
impl Move for ResolvedStyle
impl RefUnwindSafe for ResolvedStyle
impl Send for ResolvedStyle
impl Sync for ResolvedStyle
impl Unpin for ResolvedStyle
impl UnsafeUnpin for ResolvedStyle
impl UnwindSafe for ResolvedStyle
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