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

Something wrong with scaling #2647

Open
SantaSpeen opened this issue Nov 26, 2024 · 2 comments
Open

Something wrong with scaling #2647

SantaSpeen opened this issue Nov 26, 2024 · 2 comments

Comments

@SantaSpeen
Copy link

    def _center(self):
        self.update_idletasks()
        width = self.winfo_width()
        height = self.winfo_height()
        x = (self.winfo_screenwidth() // 2) - (width // 2)
        y = (self.winfo_screenheight() // 2) - (height // 2)
        self.geometry(f"{width}x{height}+{x}+{y}")

I use _center to center the window, however this happens:
image
without:
image

@SantaSpeen
Copy link
Author

SantaSpeen commented Nov 26, 2024

But if i use:

ctk.deactivate_automatic_dpi_awareness()

image

All is good, window centering normal
But image so dirty

@SantaSpeen
Copy link
Author

SantaSpeen commented Nov 26, 2024

login_box.py: login_box.zip

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

1 participant