Additionally apply DPI scaling to font size if detected
parent
a0034e2948
commit
a5ad24f770
|
@ -123,15 +123,8 @@ class DpiAwareFont:
|
|||
|
||||
mult = 1.0
|
||||
|
||||
if (
|
||||
hasattr(Qt, 'AA_EnableHighDpiScaling')
|
||||
and QCoreApplication.testAttribute(Qt.AA_EnableHighDpiScaling)
|
||||
):
|
||||
inches *= scale
|
||||
|
||||
# No implicit DPI scaling was done by the DE so let's engage
|
||||
# some hackery ad-hoc scaling shiat.
|
||||
else:
|
||||
# dpi is likely somewhat scaled down so use slightly larger font size
|
||||
if scale >= 1.1 and self._font_size:
|
||||
|
||||
|
@ -145,6 +138,12 @@ class DpiAwareFont:
|
|||
# TODO: this multiplier should probably be determined from
|
||||
# relative aspect ratios or something?
|
||||
inches *= mult
|
||||
#inches = inches*2
|
||||
if (
|
||||
hasattr(Qt, 'AA_EnableHighDpiScaling')
|
||||
and QCoreApplication.testAttribute(Qt.AA_EnableHighDpiScaling)
|
||||
):
|
||||
inches *= round(scale)
|
||||
|
||||
# TODO: we might want to fiddle with incrementing font size by
|
||||
# +1 for the edge cases above. it seems doing it via scaling is
|
||||
|
|
Loading…
Reference in New Issue