Some minor fixes, add qApp info, and a PNG app icon
This commit is contained in:
@@ -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 |
@@ -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()
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user