From b76d21b170179bae610632a6569e6816c2f67f0a Mon Sep 17 00:00:00 2001 From: Sven Thiele <1641315+sthiele@users.noreply.github.com> Date: Tue, 2 Jul 2024 11:02:41 +0200 Subject: [PATCH] Per default use system font size (#517) --- cnapy/appdata.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cnapy/appdata.py b/cnapy/appdata.py index f622d71..a096cc4 100644 --- a/cnapy/appdata.py +++ b/cnapy/appdata.py @@ -16,7 +16,7 @@ from optlang.symbolics import Zero from optlang_enumerator.cobra_cnapy import CNApyModel from qtpy.QtCore import Qt, Signal, QObject -from qtpy.QtGui import QColor +from qtpy.QtGui import QColor, QFont from qtpy.QtWidgets import QMessageBox # from straindesign.parse_constr import linexprdict2str # indirectly leads to a JVM restart exception?!? @@ -41,8 +41,10 @@ def __init__(self): self.scen_color_good = QColor(130, 190, 0) self.scen_color_warn = QColor(255, 200, 0) self.scen_color_bad = Qt.red - - self.font_size = 9 + + font = QFont() + font.setFamily(font.defaultFamily()) + self.font_size = font.pointSize() self.box_width = 80 self.box_height = 40 self.comp_color = QColor(0, 170, 255)