-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
WPF Popup - Change to absolute positioning #916
Conversation
This avoids win 8/8.1 menu alignment settings
popup.HorizontalOffset = popupOffset.X / matrix.M11; | ||
popup.VerticalOffset = popupOffset.Y / matrix.M22; | ||
var locationFromScreen = this.PointToScreen(popupOffset); | ||
var targetPoint = |
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.
Use matrix
to perform the transform.
@svantreeck Couple of minor changes, apart from that looks solid 👍 Thanks for the contribution! |
I updated the code...tested and working on windows 10. I'll check it out on a few other boxes (8.1 and 7) tomorrow morning to double check things look ok there because things didn't look correct with DPI scaling when I first turned it tried the code in Win10, so now that its right there, I very possibly messed up on 7/8/8.1 |
No problem, |
It looks fine to me on win 8.1, I think its good to go unless you can see any issues with it. |
It will need testing using a range of scenarios. Does it work under win 7? |
Looks like the |
@@ -1067,9 +1067,10 @@ private void SetPopupSizeAndPositionImpl(int width, int height, int x, int y) | |||
popup.Width = width; |
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.
I think we need to scale the width and height from the results I'm seeing on Win7 at 1.25
I would second that...I have a screen with 150% scaling and was getting an ugly black background around the edges. Commited an update to scale the width and height by the matrix. |
Great 👍 Can you give a quick summary of all the combinations you've tested with so far? Basically looks like it's working now, just need to make sure we haven't missed anything before committing. |
I've tested on: |
WPF Popup - Change to absolute positioning
This avoids win 8/8.1 menu alignment settings where they can cause devices to not show relative positioned popups where expected.
This fixes issue #906