From b16f9eca0ef99003159099e98a511b9b5960d092 Mon Sep 17 00:00:00 2001 From: sbosse Date: Wed, 28 Aug 2024 21:40:15 +0200 Subject: [PATCH] Wed 28 Aug 21:38:52 CEST 2024 --- src/SimNDT/gui/constants.py | 61 +++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 src/SimNDT/gui/constants.py diff --git a/src/SimNDT/gui/constants.py b/src/SimNDT/gui/constants.py new file mode 100644 index 0000000..69ad958 --- /dev/null +++ b/src/SimNDT/gui/constants.py @@ -0,0 +1,61 @@ +__author__ = 'Miguel Molero' + +import sys +import os + +FONT_NAME = "Helvetica" +SCALE_UI = 1 + +if sys.platform == "darwin": + FONT_SIZE_1 = 13 + FONT_SIZE_2 = 12 + FONT_SIZE_3 = 11 +else: + FONT_SIZE_1 = 10 + FONT_SIZE_2 = 9 + FONT_SIZE_3 = 8 + +if os.environ.get('HIGH_DPI') == "1": + FONT_SIZE_1 = 13 + FONT_SIZE_2 = 12 + FONT_SIZE_3 = 11 + SCALE_UI = 1.4 + + + +if (sys.version_info > (3, 0)): + + RHO = chr(961) + MU = chr(956) + LAMBDA = chr(955) + RHO_LABEL = chr(961) + " (kg/m3)" + LAMBDA_LABEL = chr(955) + " (GPa)" + MU_LABEL = chr(956) + " (GPa)" + ETAV_LABEL = chr(951) + ""+chr(955)+"" + " (GPa)" + ETAS_LABEL = chr(951) + ""+chr(956)+"" + " (GPa)" + + VL_LABEL = " VL " + " (m/s)" + VT_LABEL = " VT " + " (m/s)" + + MARK = u"\u2713" + CROSS = u"\u2718" + +else: + + RHO = u"\u03C1" + MU = u"\u03BC" + LAMBDA = u"\u03BB" + RHO_LABEL = u"\u03C1" + " (kg/m3)" + LAMBDA_LABEL = u"\u03BB" + " (GPa)" + MU_LABEL = u"\u03BC" + " (GPa)" + ETAV_LABEL = u'\u0397' + "" + u'\u03BB' + "" + " (GPa)" + ETAS_LABEL = u'\u0397' + "" + u'\u03BC' + "" + " (GPa)" + + VL_LABEL = " VL " + " (m/s)" + VT_LABEL = " VT " + " (m/s)" + + MARK = u"\u2713" + CROSS = u"\u2718" + + +DEGREE_ANGLE = chr(176)