Some minor fixes, add qApp info, and a PNG app icon

This commit is contained in:
Veronica K. B. Olsen
2020-05-12 21:51:57 +02:00
parent 8d1e6264d5
commit d78dd24291
4 changed files with 7 additions and 4 deletions
+3
View File
@@ -31,6 +31,7 @@ import logging
from os import path, remove, rename
from PyQt5.QtGui import QIcon
from PyQt5.QtWidgets import QApplication
from nw.guimain import GuiMain
@@ -225,6 +226,8 @@ def main(sysArgs=None):
nwApp = QApplication([__package__,("-style=%s" % qtStyle)])
nwApp.setApplicationName(__package__)
nwApp.setApplicationVersion(__version__)
nwApp.setWindowIcon(QIcon(CONFIG.appIcon))
nwApp.setOrganizationDomain("novelwriter.io")
nwGUI = GuiMain()
sys.exit(nwApp.exec_())
Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

+2 -2
View File
@@ -31,7 +31,7 @@ import nw
from PyQt5.QtCore import Qt, QSize
from PyQt5.QtGui import QFont, QColor
from PyQt5.QtWidgets import (
QTreeWidget, QTreeWidgetItem, QAbstractItemView, QApplication, QMessageBox
qApp, QTreeWidget, QTreeWidgetItem, QAbstractItemView, QMessageBox
)
from nw.core import NWDoc
@@ -207,7 +207,7 @@ class GuiDocTree(QTreeWidget):
"""Move an item up or down in the tree, but only if the treeView
has focus. This also applies when the menu is used.
"""
if QApplication.focusWidget() == self and self.theParent.hasProject:
if qApp.focusWidget() == self and self.theParent.hasProject:
tHandle = self.getSelectedHandle()
tItem = self._getTreeItem(tHandle)
pItem = tItem.parent()
+2 -2
View File
@@ -30,7 +30,7 @@ import nw
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import (
QFrame, QGridLayout, QLabel, QLineEdit, QPushButton, QApplication
qApp, QFrame, QGridLayout, QLabel, QLineEdit, QPushButton
)
from nw.constants import nwDocAction
@@ -127,7 +127,7 @@ class GuiSearchBar(QFrame):
return
def _doSearch(self):
modKey = QApplication.keyboardModifiers()
modKey = qApp.keyboardModifiers()
if modKey == Qt.ShiftModifier:
self.theParent.docEditor.docAction(nwDocAction.GO_PREV)
else: