-
Notifications
You must be signed in to change notification settings - Fork 1k
Scaling
CustomTkinter supports HighDPI scaling on macOS and Windows by default. On macOS scaling works automatically for Tk windows. On Windows, the app is made DPI aware (windll.shcore.SetProcessDpiAwareness(2)
) and the current scaling factor of the display is detected. Then every element and the window dimensions are scaled by this factor by CustomTkinter.
![169710599-b7479382-dd9d-4423-9d48-50ec06ca880a](https://user-images.githubusercontent.com/66446067/169716777-ed811c3a-3f74-4dd7-9a80-defce62306c7.png)
You can deactivate this automatic scaling like the following:
customtkinter.deactivate_automatic_dpi_awareness()
Then the window will be blurry on Windows with a scaling value of more than 100%.
In addition to the automatically detected scaling factor, you can also set your own scaling factors for the application like the following:
customtkinter.set_widget_scaling(float_value) # widget dimensions and text size
customtkinter.set_window_scaling(float_value) # window geometry dimensions
CustomTkinter by Tom Schimansky 2022
The Github Wiki is outdated, the new documentation can be found at: