Add detailed comment around DE scaling

windows_fixes_yo
Tyler Goodlet 2022-02-10 13:04:13 -05:00
parent a5ad24f770
commit 5a4c155798
1 changed files with 6 additions and 2 deletions

View File

@ -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"