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

Node selection menu is displaced by Windows Display scaling. #475

Open
moreApi opened this issue Jun 14, 2023 · 2 comments
Open

Node selection menu is displaced by Windows Display scaling. #475

moreApi opened this issue Jun 14, 2023 · 2 comments

Comments

@moreApi
Copy link
Member

moreApi commented Jun 14, 2023

When windows display scaling is active like this:
image
then the node selection popup menu is displaced by that amount:
image In the picture the user clicked on the middle of the box and that is the location the menu is expected but the position iof the menu has been multiplied by 1.5. (Clicking on other parts of the screen shows the 1.5 relation. E.g. clicking in the top left corner (0,0) places the menu correctly (0,0) * 1.5 = (0,0). The further away one clicks from the top left corner the larger is the displacement.)

Setting the scaling to 100% and restarting the application removes that behavior.

This might be a swing issue.

@ctrueden
Copy link
Member

ctrueden commented Jun 14, 2023

Duplicate of #469? Err, I guess not a duplicate, but seems likely we could address it as part of a broader fix for HiDPI...

@kephale
Copy link
Member

kephale commented Feb 19, 2024

I found that val dpiScaling = Toolkit.getDefaultToolkit().screenResolution.toDouble() / 96.0 wasn't leading to a scale factor that helped (i needed 0.5, but am getting 1.5729166666666667)

This is an easy place to test out:

sciview.showContextNodeChooser(x, y)

then if you run sciview and add the mesh demo and double click on it the context menu should show up. When I scale x, y by 0.5 I can get the context menu in the right place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants