You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The node’s size plus some additional margin around it to account for drawing effects (for example shadows) or node’s parts outside the size rectangle (for example port points).
The default implementation returns QSize + 20 percent of width and heights at each side of the rectangle.
For resizable nodes, this percentage ends up being pretty significant in terms of hit box detection for selecting nodes. In the stated example of the types of effects or node parts, namely shadows, a fixed padding would probably be more appropriate as drop shadows shouldn't be changing the amount of offset when a node scales. There also doesn't seem to be an easy way to override this especially when using the DataFlow* classes. I would be happy to provide a PR but wanted to discuss first.
The text was updated successfully, but these errors were encountered:
You are right, the default values might be sub-optimal because I did not delelop any large realistic application based on this framework.
I think the best work-around would be making the code extensible.
Perhaps something similar to cusom "node painter" or "connection painter" in BasicGraphicsScene could be a solution.
I.e. we could have a pair of functions nodeGeometry() and setNodeGeometry(unique_ptr<AbstractNodeGeometry> && g)
setNodeGeometry was exactly what I was searching for when I posted this. I think that's the way to go. I'll do it but it might take a bit for me to send the PR. Thanks again for a great little library.
For resizable nodes, this percentage ends up being pretty significant in terms of hit box detection for selecting nodes. In the stated example of the types of effects or node parts, namely shadows, a fixed padding would probably be more appropriate as drop shadows shouldn't be changing the amount of offset when a node scales. There also doesn't seem to be an easy way to override this especially when using the DataFlow* classes. I would be happy to provide a PR but wanted to discuss first.
The text was updated successfully, but these errors were encountered: