fix: make hard controls also limit range movement

This commit is contained in:
mtvare6
2025-07-12 05:02:00 +05:30
parent 6780626768
commit 6aee1e6fb9
7 changed files with 70 additions and 6 deletions

View File

@@ -162,8 +162,14 @@ fn blending<T: SetBlendMode + MultiplyAlpha + MultiplyFill + SetClip>(
)]
mut value: T,
blend_mode: BlendMode,
#[default(100.)] opacity: Percentage,
#[default(100.)] fill: Percentage,
#[hard_min(0.)]
#[hard_max(100.)]
#[default(100.)]
opacity: Percentage,
#[hard_min(0.)]
#[hard_max(100.)]
#[default(100.)]
fill: Percentage,
#[default(false)] clip: bool,
) -> T {
// TODO: Find a way to make this apply once to the table's parent (i.e. its row in its parent table or Instance<T>) rather than applying to each row in its own table, which produces the undesired result

View File

@@ -55,6 +55,8 @@ pub struct FieldMetadata {
pub default_type: Option<Type>,
pub number_min: Option<f64>,
pub number_max: Option<f64>,
pub number_hard_min: Option<f64>,
pub number_hard_max: Option<f64>,
pub number_mode_range: Option<(f64, f64)>,
pub number_display_decimal_places: Option<u32>,
pub number_step: Option<f64>,