mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-16 23:08:05 +08:00
fix: make hard controls also limit range movement
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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>,
|
||||
|
||||
Reference in New Issue
Block a user