From 32c6395d404c8804ee12149efe6afbd927fcebe5 Mon Sep 17 00:00:00 2001 From: Salvo 'LtWorf' Tomaselli Date: Sat, 6 Jun 2015 18:51:29 +0200 Subject: [PATCH] Improve fonts settings on windows Hardcode a size in the UI. This is not optimal buf for the moment I can't do better. Also, use yet another font for the delete buttons. --- relational_gui.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/relational_gui.py b/relational_gui.py index f5bd704..70b9890 100755 --- a/relational_gui.py +++ b/relational_gui.py @@ -106,10 +106,16 @@ if __name__ == "__main__": ui.setupUi(form) if sys.platform.startswith('win'): winFont = 'Cambria' - ui.lstHistory.setFont(QtGui.QFont(winFont)) - ui.txtMultiQuery.setFont(QtGui.QFont(winFont)) - ui.txtQuery.setFont(QtGui.QFont(winFont)) - ui.groupOperators.setFont(QtGui.QFont(winFont)) + size = 12 + increment = 4 + symbolFont = 'Segoe UI Symbol' + form.setFont(QtGui.QFont('Dejavu Sans',size)) + ui.lstHistory.setFont(QtGui.QFont(winFont,size+increment)) + ui.txtMultiQuery.setFont(QtGui.QFont(winFont,size+increment)) + ui.txtQuery.setFont(QtGui.QFont(winFont,size+increment)) + ui.groupOperators.setFont(QtGui.QFont(winFont,size+increment)) + ui.cmdClearMultilineQuery.setFont(QtGui.QFont(symbolFont)) + ui.cmdClearQuery.setFont(QtGui.QFont(symbolFont)) form.restore_settings()