From 07a5bf4b7c813f4b95e2ae59abbfb7724a7e8c84 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Fri, 19 Mar 2021 09:33:47 -0400 Subject: [PATCH] Use low dpi inches on 96 dpi --- piker/ui/_style.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/piker/ui/_style.py b/piker/ui/_style.py index cbadc630..a0232a08 100644 --- a/piker/ui/_style.py +++ b/piker/ui/_style.py @@ -90,11 +90,16 @@ class DpiAwareFont: ldpi = screen.logicalDotsPerInch() dpi = max(pdpi, ldpi) + # for low dpi scale everything down + if dpi <= 96: + self._iwl = _default_font_inches_we_like_low_dpi + font_size = math.floor(self._iwl * dpi) log.info( f"\nscreen:{screen.name()} with DPI: {dpi}" f"\nbest font size is {font_size}\n" ) + self._set_qfont_px_size(font_size) self._physical_dpi = dpi