- Timestamp:
- Aug 14, 2018 9:40:46 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- 4bf58293, 04ac604
- Parents:
- 328f2ef
- Location:
- src/sas/qtgui/Utilities
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Utilities/GuiUtils.py
r685e0e3 r3933ee9 312 312 return clone 313 313 314 315 def getMonospaceFont(): 316 """Convenience function; returns a monospace font to be used in any shells, code editors, etc.""" 317 318 # Note: Consolas is only available on Windows; the style hint is used on other operating systems 319 font = QtGui.QFont("Consolas", 10) 320 font.setStyleHint(QtGui.QFont.Monospace, QtGui.QFont.PreferQuality) 321 return font 314 322 315 323 def createModelItemWithPlot(update_data, name=""): -
src/sas/qtgui/Utilities/IPythonWidget.py
rfbfc488 r3933ee9 4 4 5 5 from PyQt5 import QtSvg 6 7 from sas.qtgui.Utilities import GuiUtils 6 8 7 9 def new_load_qt(api_options): … … 35 37 app = guisupport.get_app_qt4() 36 38 39 font = GuiUtils.getMonospaceFont() 40 self.font = font 41 37 42 # Create an in-process kernel 38 43 kernel_manager = QtInProcessKernelManager() -
src/sas/qtgui/Utilities/ModelEditor.py
r26970b3 r3933ee9 3 3 4 4 from sas.qtgui.Utilities.UI.ModelEditor import Ui_ModelEditor 5 from sas.qtgui.Utilities import GuiUtils 5 6 6 7 class ModelEditor(QtWidgets.QDialog, Ui_ModelEditor): … … 30 31 self.highlight = PythonHighlighter(self.txtEditor.document()) 31 32 33 self.txtEditor.setFont(GuiUtils.getMonospaceFont()) 34 32 35 def addSignals(self): 33 36 """ -
src/sas/qtgui/Utilities/PluginDefinition.py
r060413c r3933ee9 4 4 5 5 from sas.qtgui.Utilities.UI.PluginDefinitionUI import Ui_PluginDefinition 6 from sas.qtgui.Utilities import GuiUtils 6 7 7 8 # txtName … … 64 65 """ 65 66 self.txtFunction.insertPlainText(text) 67 self.txtFunction.setFont(GuiUtils.getMonospaceFont()) 66 68 67 69 # Validators
Note: See TracChangeset
for help on using the changeset viewer.