pub struct WidgetVisuals {
pub bg_fill: Color32,
pub weak_bg_fill: Color32,
pub bg_stroke: Stroke,
pub corner_radius: CornerRadius,
pub fg_stroke: Stroke,
pub expansion: f32,
}Expand description
bg = background, fg = foreground.
Fields§
§bg_fill: Color32Background color of widgets that must have a background fill, such as the slider background, a checkbox background, or a radio button background.
Must never be Color32::TRANSPARENT.
weak_bg_fill: Color32Background color of widgets that can optionally have a background fill, such as buttons.
May be Color32::TRANSPARENT.
bg_stroke: StrokeFor surrounding rectangle of things that need it,
like buttons, the box of the checkbox, etc.
Should maybe be called frame_stroke.
corner_radius: CornerRadiusButton frames etc.
fg_stroke: StrokeStroke and text color of the interactive part of a component (button text, slider grab, check-mark, …).
expansion: f32Make the frame this much larger.
The problem with “expanding” widgets is that they now want to paint outside their own bounds, which then requires all parent UIs to have proper margins.
It also means hovered things are no longer properly aligned with every other widget.
Implementations§
Source§impl WidgetVisuals
impl WidgetVisuals
pub fn text_color(&self) -> Color32
pub fn rounding(&self) -> CornerRadius
Trait Implementations§
Source§impl Clone for WidgetVisuals
impl Clone for WidgetVisuals
Source§fn clone(&self) -> WidgetVisuals
fn clone(&self) -> WidgetVisuals
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more