Improve NumberInput with dragging to change value and escape/right-click to abort (#1469)

* Improve NumberInput with dragging to change value and escape to abort

Closes #1468

* Fix slowing with Shift and integer mode
This commit is contained in:
Keavon Chambers
2023-11-21 17:26:28 -08:00
committed by GitHub
parent da4d95fa7b
commit 34c6c0431b
9 changed files with 488 additions and 151 deletions

View File

@@ -39,9 +39,9 @@ pub fn default_mapping() -> Mapping {
refresh_keys=[Control],
action_dispatch=NavigationMessage::PointerMove { snap_angle: Control, wait_for_snap_angle_release: true, snap_zoom: Control, zoom_from_viewport: None },
),
entry!(KeyDown(Lmb); action_dispatch=NavigationMessage::TransformFromMenuEnd { commit_key: Key::Lmb }),
entry!(KeyDown(Mmb); action_dispatch=NavigationMessage::TransformFromMenuEnd { commit_key: Key::Mmb }),
entry!(KeyDown(Rmb); action_dispatch=NavigationMessage::TransformFromMenuEnd { commit_key: Key::Rmb }),
entry!(KeyDown(Lmb); action_dispatch=NavigationMessage::TransformFromMenuEnd { commit_key: Key::Lmb }),
entry!(KeyDown(Mmb); action_dispatch=NavigationMessage::TransformFromMenuEnd { commit_key: Key::Mmb }),
entry!(KeyDown(Rmb); action_dispatch=NavigationMessage::TransformFromMenuEnd { commit_key: Key::Rmb }),
// NORMAL PRIORITY:
//
// NodeGraphMessage

View File

@@ -193,7 +193,7 @@ pub struct NumberInput {
// Number presentation
#[serde(rename = "displayDecimalPlaces")]
#[derivative(Default(value = "3"))]
#[derivative(Default(value = "2"))]
pub display_decimal_places: u32,
pub unit: String,