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)