From e6bc73d9c7bc7d09737b4c2d24e427ff117468b9 Mon Sep 17 00:00:00 2001 From: Ivan Holmes Date: Fri, 1 Nov 2019 20:01:02 +0000 Subject: [PATCH] enable high dpi scaling --- gui.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gui.py b/gui.py index 512b864..50ce4f8 100644 --- a/gui.py +++ b/gui.py @@ -9,7 +9,7 @@ Created on Wed May 29 00:02:24 2019 import sys, fitz, io, subprocess, os from PyQt5.QtWidgets import QApplication, QAction, QLabel, QDialogButtonBox, QDialog, QFileDialog, QMessageBox, QPushButton, QLineEdit, QCheckBox, QSpinBox, QDoubleSpinBox, QTableWidget, QTableWidgetItem, QTabWidget, QComboBox, QWidget, QScrollArea -from PyQt5.QtCore import QFile, QObject +from PyQt5.QtCore import QFile, QObject, Qt from PyQt5.QtGui import QPixmap, QImage from PyQt5 import uic from chordsheet.tableView import ChordTableView, BlockTableView , MItemModel, MProxyStyle @@ -28,6 +28,8 @@ if getattr(sys, 'frozen', False): else: scriptDir = os.path.abspath(os.path.dirname(os.path.abspath(__file__))) +QApplication.setAttribute(Qt.AA_EnableHighDpiScaling, True) + pdfmetrics.registerFont(TTFont('FreeSans', os.path.join(scriptDir, 'fonts', 'FreeSans.ttf'))) if sys.platform == "darwin": pdfmetrics.registerFont(TTFont('HelveticaNeue', 'HelveticaNeue.ttc', subfontIndex=0))