min size for color property editor
use crate::{
color::{ColorFieldBuilder, ColorFieldMessage},
- core::color::Color,
+ core::{algebra::Vector2, color::Color},
inspector::{
editors::{
PropertyEditorBuildContext, PropertyEditorDefinition, PropertyEditorInstance,
@@ -29,7 +29,9 @@ impl PropertyEditorDefinition for ColorPropertyEditorDefinition {
let value = ctx.property_info.cast_value::<Color>()?;
Ok(PropertyEditorInstance::Simple {
editor: ColorFieldBuilder::new(
- WidgetBuilder::new().with_margin(Thickness::uniform(1.0)),
+ WidgetBuilder::new()
+ .with_min_size(Vector2::new(0.0, 17.0))
+ .with_margin(Thickness::uniform(1.0)),
)
.with_color(*value)
.build(ctx.build_context),
