Skip to content

Added preference for zoom wheel rate adjustment #2413

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

Dhanraj30
Copy link

Closes #2411

Copy link
Member

@0HyperCube 0HyperCube left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution.

However please ensure that it compiles and works properly before creating a PR in the «ready to review» state.

@@ -14,6 +14,7 @@ pub struct PreferencesMessageHandler {
pub use_vello: bool,
pub vector_meshes: bool,
pub graph_wire_style: GraphWireStyle,
pub zoom_wheel_rate: Option<f64>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this an option? Is there a case when we'd have a zoom wheel rate of None?

.min(0.001)
.max(0.1)
.on_update(|number_input: &NumberInput| {
PreferencesMessage::ZoomWheelRate { rate: number_input.value }.into()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't compile:

error[E0308]: mismatched types
  --> editor/src/messages/dialog/preferences_dialog/preferences_dialog_message_handler.rs:68:63
   |
68 |                     PreferencesMessage::ZoomWheelRate { rate: number_input.value }.into()
   |                                                               ^^^^^^^^^^^^^^^^^^ expected `f64`, found `Option<f64>`

@0HyperCube 0HyperCube marked this pull request as draft March 9, 2025 10:55
@Dhanraj30
Copy link
Author

Try to fix issue and requested changes

@Keavon
Copy link
Member

Keavon commented Mar 10, 2025

Thanks for showing an interest in contributing to Graphite. Unfortunately, your PRs do not meet the minimum bar for quality as they are untested and do not compile (and chances are high that they are not human-authored) so we won't be considering them further. Best of luck in your future programming journey.

@Keavon Keavon closed this Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Preference to adjust zoom rate
3 participants