pub struct DefaultsBorderSpec {
pub color: Option<Rgba>,
pub corner_radius: Option<f32>,
pub corner_radius_lg: Option<f32>,
pub line_width: Option<f32>,
pub opacity: Option<f32>,
pub shadow_enabled: Option<bool>,
}Expand description
Defaults-level border specification: color, geometry, and opacity.
Used on ThemeDefaults for global border
properties that are inherited by per-widget borders.
No padding fields: Padding (padding_horizontal, padding_vertical)
lives exclusively on WidgetBorderSpec because padding is a widget-level
layout concern, not a global default. This split (Phase 79, BORDER-01)
eliminated the former “derives-from-presence” rule where the resolver
would fill padding with 0.0 based on whether line_width or
corner_radius was set – a confusing proxy heuristic that is no longer
needed.
All fields are optional to support partial overlays – a DefaultsBorderSpec
with only color set will only override the color when merged.
Fields§
§color: Option<Rgba>Border color.
corner_radius: Option<f32>Corner radius in logical pixels.
corner_radius_lg: Option<f32>Large corner radius in logical pixels (defaults only).
line_width: Option<f32>Border stroke width in logical pixels.
opacity: Option<f32>Border alpha multiplier 0.0-1.0 (defaults only).
shadow_enabled: Option<bool>Whether the bordered element has a drop shadow.
Implementations§
Source§impl DefaultsBorderSpec
impl DefaultsBorderSpec
Trait Implementations§
Source§impl Clone for DefaultsBorderSpec
impl Clone for DefaultsBorderSpec
Source§fn clone(&self) -> DefaultsBorderSpec
fn clone(&self) -> DefaultsBorderSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more