diff --git a/hui/src/element/builtin/image.rs b/hui/src/element/builtin/image.rs index 0b7511a..1470134 100644 --- a/hui/src/element/builtin/image.rs +++ b/hui/src/element/builtin/image.rs @@ -10,6 +10,7 @@ use crate::{ }; #[derive(Setters)] +#[setters(prefix = "with_")] pub struct Image { /// Image handle to draw #[setters(skip)] diff --git a/hui/src/layout.rs b/hui/src/layout.rs index 2b4be77..ac6658e 100644 --- a/hui/src/layout.rs +++ b/hui/src/layout.rs @@ -82,15 +82,19 @@ impl From for Alignment2d { /// (Meaning of `auto` is entirely dependent on the element). #[derive(Default, Debug, Clone, Copy, PartialEq)] pub enum Size { - #[default] /// Automatically calculate size based on content + #[default] Auto, + /// Size as a ratio of parent size\ /// Valid range: 0.0-1.0 (0-100%) /// /// Out of range values are allowed, but are not guaranteed to work as expected\ /// (especially with negative values) Fraction(f32), + + //TODO FractionRemaining(f32), + /// Static size in pixels Static(f32), }