mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 12:24:00 +02:00
Add some debug mode output for dpi and dpr
This commit is contained in:
parent
139047b29e
commit
b003cd6f81
1 changed files with 7 additions and 1 deletions
|
|
@ -16,7 +16,7 @@
|
|||
APP_UID = 'libprs500'
|
||||
from calibre import prints
|
||||
from calibre.constants import (islinux, iswindows, isbsd, isfrozen, isosx,
|
||||
plugins, config_dir, filesystem_encoding, isxp)
|
||||
plugins, config_dir, filesystem_encoding, isxp, DEBUG)
|
||||
from calibre.utils.config import Config, ConfigProxy, dynamic, JSONConfig
|
||||
from calibre.ebooks.metadata import MetaInformation
|
||||
from calibre.utils.date import UNDEFINED_DATE
|
||||
|
|
@ -886,6 +886,12 @@ def __init__(self, args, force_calibre_style=False, override_program_name=None,
|
|||
QApplication.setAttribute(Qt.AA_EnableHighDpiScaling, True)
|
||||
QApplication.__init__(self, qargs)
|
||||
self.setAttribute(Qt.AA_UseHighDpiPixmaps)
|
||||
if DEBUG and not headless:
|
||||
prints('devicePixelRatio:', self.devicePixelRatio())
|
||||
s = self.primaryScreen()
|
||||
if s:
|
||||
prints('logicalDpi:', s.logicalDotsPerInchX(), 'x', s.logicalDotsPerInchY())
|
||||
prints('physicalDpi:', s.physicalDotsPerInchX(), 'x', s.physicalDotsPerInchY())
|
||||
if not iswindows:
|
||||
self.setup_unix_signals()
|
||||
if islinux or isbsd:
|
||||
|
|
|
|||
Loading…
Reference in a new issue