-
Notifications
You must be signed in to change notification settings - Fork 668
[DYN-7840] Inaccurate popup placement for input nodes in collapsed groups - Follow-up #16263
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
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.
See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-7840
|
@ivaylo-matov please try merging the master, it should fix the failing checks |
| private static double GetDpiScale() | ||
| { | ||
| var source = PresentationSource.FromVisual(Application.Current.MainWindow); | ||
| return source?.CompositionTarget?.TransformToDevice.M22 ?? 1.0; | ||
| } |
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.
probably a good idea to wrap this in a try-catch?
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.
👍 done
zeusongit
left a comment
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.
One comment, LGTM
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.
Pull Request Overview
A fix addressing inaccurate popup placement for input nodes in collapsed groups by incorporating DPI scaling adjustments and improving arrow alignment.
- Incorporates DPI scaling (via GetDpiScale) into placement logic in PortViewModel, adjusting both left and right context menu popups.
- Adjusts Y-coordinate calculation in PlacePortContextMenu to ensure proper alignment across various DPI settings.
- Updates the vector path Data in InPortContextMenu.xaml to improve the vertical centering of chevron arrows.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/DynamoCoreWpf/ViewModels/Core/PortViewModel.cs | Adds DPI scaling adjustments to popup placement logic and introduces a helper method (GetDpiScale) for DPI retrieval. |
| src/DynamoCoreWpf/Controls/InPortContextMenu.xaml | Updates the Path Data for chevron arrows for better visual alignment. |
…te-popup-placement-for-input-nodes-in-collapsed-groups_follow-up
Purpose
This PR addresses DYN-7840 and follows up on feedback from DYN-8055.
Changes in the logic on
PortViewModelensure that the Windows display scale (dpi) factor is taken into account when positioning the port context menu popup. The adjustment primarily affects the horizontal placement, making sure the chevron arrow remains visually centered relative to the port across different scaling levels.The
Datapath for the popup chevron arrows has been updated to improve vertical alignment. This ensures the arrow appears centered within the popup body, especially at smaller zoom levels, where it previously gave the impression of being slightly off-center.Declarations
Check these if you believe they are true
*.resxfilesRelease Notes
Fixed placement of Context menu popup for nodes in collapsed groups.
Reviewers
@DynamoDS/eidos
@jasonstratton
FYIs
@dnenov
@achintyabhat