TomSchimansky / CustomTkinter

A modern and customizable python UI-library based on Tkinter
MIT License
11.63k stars 1.09k forks source link

Something wrong with scaling #2647

Open SantaSpeen opened 3 days ago

SantaSpeen commented 3 days ago
    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 commented 3 days ago

But if i use:

ctk.deactivate_automatic_dpi_awareness()

image

All is good, window centering normal But image so dirty

SantaSpeen commented 3 days ago

login_box.py: login_box.zip