diff --git a/README.md b/README.md index 898316cdc128c7830d0991bf231310767bc91744..dfb481a8bf2d48c4181f3a7b008061353547ea92 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ log.info('Hello world!') ## Attributions Free software used: -* [PyQt5](https://riverbankcomputing.com/software/pyqt/intro) - GPLv3 License, Copyright (c) 2017 Riverbank Computing Limited <info@riverbankcomputing.com> +* [PyQt5](https://riverbankcomputing.com/software/pyqt/intro) - GPLv3 License, Copyright (c) 2018 Riverbank Computing Limited <info@riverbankcomputing.com> * [ion-icons](https://github.com/ionic-team/ionicons) - MIT License, Copyright (c) 2016 Drifty (http://drifty.com/) And thanks to [logview](https://pythonhosted.org/logview/) by Vinay Sajip for UI inspiration. diff --git a/cutelog/config.py b/cutelog/config.py index f9e61fbcbb828ab8c011e74c6c0e470e53432fab..492a5ef2b8bf3548dcd86871364a4ecb1e71dc88 100644 --- a/cutelog/config.py +++ b/cutelog/config.py @@ -1,10 +1,12 @@ +import logging import os import sys -import logging -from pkg_resources import resource_filename, get_distribution from collections import namedtuple -from PyQt5 import QtCore -from PyQt5.QtCore import QCoreApplication, QObject, pyqtSignal + +from pkg_resources import get_distribution, resource_filename +from PyQt5.QtCore import (QCoreApplication, QFile, QObject, QSettings, Qt, + pyqtSignal) + # from PyQt5.QtGui import QFont @@ -61,7 +63,7 @@ class Config(QObject): self.log = logging.getLogger() self.log.setLevel(99) self.log.debug('Initializing') - self.qsettings = QtCore.QSettings() + self.qsettings = QSettings() self.qsettings.setIniCodec('UTF-8') self.options = None @@ -98,10 +100,10 @@ class Config(QObject): return path def get_ui_qfile(self, name): - file = QtCore.QFile(f':/ui/{name}') + file = QFile(f':/ui/{name}') if not file.exists(): raise FileNotFoundError(f'ui file not found: ":/ui/{name}"') - file.open(QtCore.QFile.ReadOnly) + file.open(QFile.ReadOnly) return file @property @@ -236,6 +238,7 @@ def init_qt_info(): QCoreApplication.setApplicationName('cutelog') version = get_distribution(QCoreApplication.applicationName()).version QCoreApplication.setApplicationVersion(version) + QCoreApplication.setAttribute(Qt.AA_EnableHighDpiScaling, True) def init_logging(): diff --git a/cutelog/resources/ui/about_dialog.ui b/cutelog/resources/ui/about_dialog.ui index 97dd9924ce2d857bb3d345c068c6e9a5fa7a7b2a..0f131fae882cdf4a84cd2e302147a01aa4810f5a 100644 --- a/cutelog/resources/ui/about_dialog.ui +++ b/cutelog/resources/ui/about_dialog.ui @@ -83,7 +83,7 @@ p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">PyQt5:</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">GPLv3 License, Copyright (c) 2017 Riverbank Computing Limited &lt;info@riverbankcomputing.com&gt;</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">GPLv3 License, Copyright (c) 2018 Riverbank Computing Limited &lt;info@riverbankcomputing.com&gt;</p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">ion-icons</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">MIT License, Copyright (c) 2016 Drifty (http://drifty.com/)</p> diff --git a/cutelog/settings_dialog.py b/cutelog/settings_dialog.py index 64ca895841a984bea2a66fc4cd4f57ca3df9098b..5aa2aade34d19a7531c43703c71e722e3a4ead68 100644 --- a/cutelog/settings_dialog.py +++ b/cutelog/settings_dialog.py @@ -39,7 +39,7 @@ class SettingsDialog(*SettingsDialogBase): self.oneTabCheckBox.setToolTip("Forces all connections into one tab. " "Useful for when you're restarting one " "program very often.") - self.oneTabLabel.setBuddy(self.oneTabCheckBox) + self.oneTabLabel.setBuddy(self.oneTabCheckBox) # @Hmmm: why doesn't this work? def load_from_config(self): # Appearance page