Moved fixed with definition to themes class, made time column in project load fixed width and added thin space between words and multiplier

This commit is contained in:
Veronica K. B. Olsen
2020-09-20 11:44:33 +02:00
parent a73c5b3776
commit b9f983a348
5 changed files with 27 additions and 25 deletions
+6 -1
View File
@@ -138,8 +138,8 @@ class GuiTheme:
logger.verbose("GUI DPI: %.1f" % self.guiDPI)
logger.verbose("GUI Scale: %.2f" % self.guiScale)
# Fonts
self.guiFont = qApp.font()
self.guiFontFixed = QFontDatabase.systemFont(QFontDatabase.FixedFont)
qMetric = QFontMetrics(self.guiFont)
self.fontPointSize = self.guiFont.pointSizeF()
@@ -148,6 +148,11 @@ class GuiTheme:
self.textNHeight = qMetric.boundingRect("N").height()
self.textNWidth = qMetric.boundingRect("N").width()
# Monospace Font
self.guiFontFixed = QFont()
self.guiFontFixed.setPointSizeF(0.95*self.fontPointSize)
self.guiFontFixed.setFamily(QFontDatabase.systemFont(QFontDatabase.FixedFont).family())
logger.verbose("GUI Font Family: %s" % self.guiFont.family())
logger.verbose("GUI Font Point Size: %.2f" % self.fontPointSize)
logger.verbose("GUI Font Pixel Size: %d" % self.fontPixelSize)