Add option to adjust viewport zoom rate in the preferences dialog (#2420)

* zoom rate preference

* Add generic range mapping functions for improved reusability

* cleanup

* Map zoom slider's default value of 50 to the original zoom rate (0.005)

* use . instead of .0 for whole-number floats

* Refactor zoom rate mapping to use a fixed reference point and adjustable curve steepness

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Sidharth-Singh10
2025-04-08 07:51:46 +00:00
committed by GitHub
co-authored by Keavon Chambers
parent 6a8386d1e9
commit 3c1ec45188
6 changed files with 60 additions and 2 deletions
@@ -15,6 +15,7 @@ pub enum PreferencesMessage {
VectorMeshes { enabled: bool },
ModifyLayout { zoom_with_scroll: bool },
GraphWireStyle { style: GraphWireStyle },
ViewportZoomWheelRate { rate: f64 },
// ImaginateRefreshFrequency { seconds: f64 },
// ImaginateServerHostname { hostname: String },
}