-
Notifications
You must be signed in to change notification settings - Fork 362
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
Graph Editor: Reduce graph view auto layout spacing #1476
Graph Editor: Reduce graph view auto layout spacing #1476
Conversation
@@ -570,7 +570,7 @@ ImVec2 Graph::layoutPosition(UiNodePtr layoutNode, ImVec2 startingPos, bool init | |||
UiNodePtr nextNode = layoutNode->getConnectedNode(pins[i]->_name); | |||
if (nextNode) | |||
{ | |||
startingPos.x = (1200.f - ((layoutNode->_level) * 350)) * _fontScale; | |||
startingPos.x = (1200.f - ((layoutNode->_level) * 250)) * _fontScale; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has always been too widely spaced. Thanks for the fix.
As this is a hard-coded number still, I'm thinking it would be good to make this as display option data member on the Graph class, or at least a const somewhere. Then if needed the number can be adjusted in one obvious place.
It should handle high-dpi since it uses _fontScale
can you do a quick check with different dpi settings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a promising improvement, thanks @marwie, and I'm CC'ing @lfl-eholthouser for her thoughts on this proposal. |
That looks great! @marwie Thanks for making that change. I agree with @bernardkwok as well that it would be nice to have this value more accessible as well, maybe as a future improvement. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It sounds like everyone is in agreement, so let's move forward with the change!
Currently spacing between graph nodes is quite large. This reduces the horizontal space between nodes when using AutoLayout slightly.
Currently spacing between graph nodes is quite large.
This reduces the horizontal space between nodes when using AutoLayout slightly
Current layout
With reduced spacing
Another example with reduced spacing