godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.17k stars 98 forks source link

Clamp zoom to 30-100% in the visual shader editor #7368

Open Norrox opened 1 year ago

Norrox commented 1 year ago

Describe the project you are working on

Alot of random projects

Describe the problem or limitation you are having in your project

Not a problem really, mostly an annoyance. When you are zoomed out and need to zoom in you mostly zoom past the 100% mark, and have to press the 1:1 button

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Lock the zoom to 30-100%, is there really a need for it to go past 100%? Skärmbild 2023-07-25 103936 Skärmbild 2023-07-25 103930

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

When you scroll in to zoom in it stops att 100%

If this enhancement will not be used often, can it be worked around with a few lines of script?

All the time i think?

Is there a reason why this should be core and not an add-on in the asset library?

Should be in core.

Calinou commented 1 year ago

I wouldn't clamp zoom to 100%, as this is an accessibility concern for users with low vision or when doing screencasts/presentations. Web browsers also allow zooming above 100% for the same reason :slightly_smiling_face:

Norrox commented 1 year ago

Can't it be an checkbox in the editor settings? Accessibility Mode [ x ] ? :)

Zireael07 commented 1 year ago

I agree that having to zoom past 100% is rarely needed (even for someone using glasses as I do), and that getting back to 100% can be difficult. I'd make it a checkbox next to zoom buttons not editor settings though.

Calinou commented 1 year ago

Can't it be an checkbox in the editor settings? Accessibility Mode [ x ] ? :)

To keep the editor settings tidy, we should avoid adding settings that are unlikely to be toggled by a lot of people.

It sounds like you should be using a different approach to zooming, such as keyboard shortcuts like Ctrl + 0 to reset zoom. This keyboard shortcut is idempotent by design. If this isn't implemented in GraphEdit, this should be done.

I'd make it a checkbox next to zoom buttons not editor settings though.

I'm not aware of any application that has a "clamp zoom" checkbox right next to its zoom controls. This would take up a lot of space for something you don't toggle often.

Zireael07 commented 1 year ago

I'm not aware of any either, but hiding this in editor settings is NOT the way to go imho.

+100 to having an easily accessible keyboard shortcut to reset zoom

sammonius commented 1 year ago

An easier solution would be just to add a shortcut for the 1:1 button. Maybe one of the F# keys.

EDIT: Or make zooming towards 100% go faster than zooming away from it.

Calinou commented 1 year ago

EDIT: Or make zooming towards 100% go faster than zooming away from it.

This means that the mouse wheel would behave differently depending on direction, which I rarely find to be a good idea. It would be like if you scrolled in a text editor, and it scrolled upwards faster than it would scroll downwards :slightly_smiling_face: