From 5a4c1557982fefd74ae418d6e01f211aa183d828 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Thu, 10 Feb 2022 13:04:13 -0500 Subject: [PATCH] Add detailed comment around DE scaling --- piker/ui/_style.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/piker/ui/_style.py b/piker/ui/_style.py index 21f003d8..c60cb077 100644 --- a/piker/ui/_style.py +++ b/piker/ui/_style.py @@ -138,7 +138,11 @@ class DpiAwareFont: # TODO: this multiplier should probably be determined from # relative aspect ratios or something? inches *= mult - #inches = inches*2 + + # XXX: if additionally we detect a known DE scaling factor we + # also scale *up* our font size on top of the existing + # heuristical (aka no clue why it works) scaling from the block + # above XD if ( hasattr(Qt, 'AA_EnableHighDpiScaling') and QCoreApplication.testAttribute(Qt.AA_EnableHighDpiScaling) @@ -152,7 +156,7 @@ class DpiAwareFont: self._font_inches = inches font_size = math.floor(inches * dpi) - log.info( + log.debug( f"screen:{screen.name()}\n" f"pDPI: {pdpi}, lDPI: {ldpi}, scale: {scale}\n" f"\nOur best guess font size is {font_size}\n"