From cf2d258a276d25d3a69427c7ec7be6e57aadc355 Mon Sep 17 00:00:00 2001 From: wattygetlood <61716739+wattygetlood@users.noreply.github.com> Date: Thu, 16 Sep 2021 16:36:09 -0400 Subject: [PATCH] Only scale down for scale < 2 --- piker/ui/_style.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/piker/ui/_style.py b/piker/ui/_style.py index 34b5cb01..a7f6d985 100644 --- a/piker/ui/_style.py +++ b/piker/ui/_style.py @@ -124,14 +124,18 @@ class DpiAwareFont: if scale > 1 and self._font_size: # TODO: this denominator should probably be determined from # relative aspect ratios or something? - inches = inches * (1 / scale) * (1 + 6/16) + inches = inches * (1 + 6/16) + if scale < 2: + inches *= (1 / scale) dpi = mx_dpi + log.info(f'USING MAX DPI {dpi}') self._font_inches = inches font_size = math.floor(inches * dpi) - log.debug( - f"\nscreen:{screen.name()} with pDPI: {pdpi}, lDPI: {ldpi}" + log.info( + f"\nscreen:{screen.name()}" + f"pDPI: {pdpi}, lDPI: {ldpi}, scale: {scale}\n" f"\nOur best guess font size is {font_size}\n" ) # apply the size