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

Window doesnt scale anymore #4

Open
Thane5 opened this issue Oct 26, 2024 · 3 comments
Open

Window doesnt scale anymore #4

Thane5 opened this issue Oct 26, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@Thane5
Copy link

Thane5 commented Oct 26, 2024

Left is my app before, right after i added hidpi-tk. There is clearly something that prevents it from applying the proper DPI scale.
Screenshot 2024-10-26 201826

@Wulian233
Copy link
Owner

Wulian233 commented Oct 27, 2024

I'm guessing the left is the original, and the right is the one in use? Can you try replacing hidpitk with another package: high dpi tkinter?
https://github.com/not-dev/high-dpi-tkinter

Another option is to use the following code: from idlelib.util import fix_win_hidpi and call it before tk.Tk().

See python/cpython#119175

If the last method still shrinks, then this behavior is normal, as it only calls Windows API.

If any of the above two methods does not get smaller, that is the hidpitk bug, which I will fix later. (If yes, can you tell me which method is normal?)

Note: I fixed the high DPI issue in the built-in turtledemo of Python, and the window becoming smaller should be normal. In the screenshot of the issue, the original window size exceeded the screen size.

See python/cpython#119174 screenshot

@Thane5
Copy link
Author

Thane5 commented Oct 27, 2024

The window was also too small using hdpitkinter. with the second solutionm the window behaved as if i had done nothing at all, so proper size, but pixelated text (as the left one in my screenshot)

@Wulian233
Copy link
Owner

Thank you for your feedback, I will look at this problem sometime:)

@Wulian233 Wulian233 self-assigned this Oct 27, 2024
@Wulian233 Wulian233 added the bug Something isn't working label Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants