diff --git a/nw/__init__.py b/nw/__init__.py index 0b01a8f1..2b8b15a1 100644 --- a/nw/__init__.py +++ b/nw/__init__.py @@ -172,7 +172,7 @@ def main(sysArgs=None): debugLevel = logging.INFO elif inOpt == "--debug": debugLevel = logging.DEBUG - logFormat = "[{asctime:}] {name:>20}:{lineno:<4d} {levelname:8} {message:}" + logFormat = "[{asctime:}] {name:>22}:{lineno:<4d} {levelname:8} {message:}" elif inOpt == "--logfile": logFile = inArg toFile = True @@ -180,7 +180,7 @@ def main(sysArgs=None): toStd = False elif inOpt == "--verbose": debugLevel = VERBOSE - logFormat = "[{asctime:}] {name:>20}:{lineno:<4d} {levelname:8} {message:}" + logFormat = "[{asctime:}] {name:>22}:{lineno:<4d} {levelname:8} {message:}" elif inOpt == "--style": qtStyle = inArg elif inOpt == "--config": diff --git a/nw/gui/theme.py b/nw/gui/theme.py index c7e66a2f..b17b7055 100644 --- a/nw/gui/theme.py +++ b/nw/gui/theme.py @@ -132,9 +132,13 @@ class GuiTheme: self.loadDecoration = self.theIcons.loadDecoration # Extract Other Info - self.guiDPI = qApp.primaryScreen().physicalDotsPerInch() - self.guiFont = qApp.font() + self.guiDPI = qApp.primaryScreen().physicalDotsPerInchX() + self.guiScale = qApp.primaryScreen().logicalDotsPerInchX()/96.0 + self.mainConf.guiScale = self.guiScale + logger.verbose("GUI DPI: %.1f" % self.guiDPI) + logger.verbose("GUI Scale: %.2f" % self.guiScale) + self.guiFont = qApp.font() qMetric = QFontMetrics(self.guiFont) self.fontPointSize = self.guiFont.pointSizeF() self.fontPixelSize = int(round(qMetric.height()))