Changeset 3933ee9 in sasview for src/sas/qtgui/Utilities/GuiUtils.py


Ignore:
Timestamp:
Aug 14, 2018 9:40:46 AM (6 years ago)
Author:
Torin Cooper-Bennun <torin.cooper-bennun@…>
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
Message:

standardise monospace font for code editors, QT console

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Utilities/GuiUtils.py

    r685e0e3 r3933ee9  
    312312        return clone 
    313313 
     314 
     315def 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 
    314322 
    315323def createModelItemWithPlot(update_data, name=""): 
Note: See TracChangeset for help on using the changeset viewer.