Improve font handling

This commit is contained in:
Salvo 'LtWorf' Tomaselli 2015-06-07 01:46:47 +02:00
parent 83eaf3e57e
commit 6c44932727

View File

@ -104,12 +104,17 @@ if __name__ == "__main__":
ui = maingui.Ui_MainWindow() ui = maingui.Ui_MainWindow()
form = guihandler.relForm(ui) form = guihandler.relForm(ui)
ui.setupUi(form) ui.setupUi(form)
f = QtGui.QFont()
size = f.pointSize();
if sys.platform.startswith('win'): if sys.platform.startswith('win'):
winFont = 'Cambria' winFont = 'Cambria'
size = 10
increment = 4
symbolFont = 'Segoe UI Symbol' symbolFont = 'Segoe UI Symbol'
form.setFont(QtGui.QFont('Dejavu Sans',size)) increment = 4
else:
winFont = f.family()
symbolFont = f.family()
increment = 2
ui.lstHistory.setFont(QtGui.QFont(winFont,size+increment)) ui.lstHistory.setFont(QtGui.QFont(winFont,size+increment))
ui.txtMultiQuery.setFont(QtGui.QFont(winFont,size+increment)) ui.txtMultiQuery.setFont(QtGui.QFont(winFont,size+increment))
ui.txtQuery.setFont(QtGui.QFont(winFont,size+increment)) ui.txtQuery.setFont(QtGui.QFont(winFont,size+increment))