diff --git a/src/ui_scaling.py b/src/ui_scaling.py index 8b156a7..71d2302 100644 --- a/src/ui_scaling.py +++ b/src/ui_scaling.py @@ -23,7 +23,8 @@ def get_scaling_factor(master): except: # ... if that fails try the first one in the list monitor = monitors[0] - dpi = monitor.width / (master.winfo_screenmmwidth() / 24.0) + + dpi = monitor.width / (monitor.width_mm / 24.0) scaling_factor = dpi / 72.0 except BaseException as e: print("WARNING: could not calculate monitor dpi:", e)