-
Notifications
You must be signed in to change notification settings - Fork 1.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.
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: