Skip to content
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

Make zoom limits and step adjustable in GraphEdit #38261

Merged

Conversation

YuriSizov
Copy link
Contributor

@YuriSizov YuriSizov commented Apr 27, 2020

Closes #38249.

This also adds an optional label to the toolbar of the GraphEdit to display current zoom level (in percent).

Note: Earlier version of this PR featured a linear zoom option that was removed

2021-06-16_16-38-33.mp4

New settings are neatly grouped. I've also gone ahead and grouped connection lines related settings.

godot windows tools 64_2021-06-16_16-13-10

@AaronRecord
Copy link
Contributor

Not sure the linear zoom property is necessary, I'm not sure anyone's ever asked for this and if someone really does need this isn't it possible for them to implement it themselves?

@YuriSizov
Copy link
Contributor Author

Not sure the linear zoom property is necessary, I'm not sure anyone's ever asked for this and if someone really does need this isn't it possible for them to implement it themselves?

I'm fine with cutting it out of this PR. As for implementing it on the user side, I don't think it would be trivial, no.

@AaronRecord
Copy link
Contributor

AaronRecord commented Jun 8, 2021

Well if all the zoom properties are exposed, couldn't someone make a script that extends GraphEdit and in _unhandeled_input(), they could implement linear zooming themselves and mark the input event as handled? Or would that not work?

scene/gui/graph_edit.cpp Outdated Show resolved Hide resolved
scene/gui/graph_edit.cpp Outdated Show resolved Hide resolved
@YuriSizov YuriSizov marked this pull request as draft June 15, 2021 13:21
@YuriSizov YuriSizov added the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Jun 16, 2021
@YuriSizov YuriSizov force-pushed the adjust-graph-edit-zoom-levels branch from 2a776cd to c78e6e3 Compare June 16, 2021 13:15
@YuriSizov YuriSizov changed the title Make GraphEdit's zoom min, max and step adjustable Make zoom limits and step adjustable in GraphEdit Jun 16, 2021
@YuriSizov YuriSizov marked this pull request as ready for review June 16, 2021 13:18
@YuriSizov YuriSizov requested a review from a team as a code owner June 16, 2021 13:18
@YuriSizov
Copy link
Contributor Author

YuriSizov commented Jun 16, 2021

PR amended. The linear zoom option was removed as not that desired. Code was rebased against the most recent master, some code style changes were applied as well as some other adjustments to code to better fit the overall state of our codebase (now that I know it better).

Edit: Push below to make sure that the label has a consistent look.

@YuriSizov YuriSizov force-pushed the adjust-graph-edit-zoom-levels branch from c78e6e3 to 0a82a66 Compare June 16, 2021 13:47
Copy link
Contributor

@AaronRecord AaronRecord left a comment

Choose a reason for hiding this comment

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

Haven't tested it, but the code looks good to me.

@akien-mga akien-mga merged commit 74850b3 into godotengine:master Jun 17, 2021
@akien-mga
Copy link
Member

Thanks!

@YuriSizov YuriSizov deleted the adjust-graph-edit-zoom-levels branch June 17, 2021 12:57
@YuriSizov YuriSizov removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Jul 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GraphEdit nodes max zoom, min zoom and zoom factor can't be changed
4 participants