From 69bfb4a2093ce70356546ce02b033c78267624e0 Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Fri, 8 Nov 2019 15:41:24 +0100 Subject: [PATCH] Moved theme class to gui folder --- nw/gui/__init__.py | 2 ++ nw/{ => gui}/theme.py | 4 ++-- nw/guimain.py | 11 +++++------ 3 files changed, 9 insertions(+), 8 deletions(-) rename nw/{ => gui}/theme.py (99%) diff --git a/nw/gui/__init__.py b/nw/gui/__init__.py index a755fc97..61f1fbc9 100644 --- a/nw/gui/__init__.py +++ b/nw/gui/__init__.py @@ -3,6 +3,7 @@ # Main Window Elements from nw.gui.mainmenu import GuiMainMenu from nw.gui.statusbar import GuiMainStatus +from nw.gui.theme import GuiTheme # Dialogs from nw.gui.dialogs.configeditor import GuiConfigEditor @@ -28,6 +29,7 @@ from nw.gui.tools.wordcounter import WordCounter __all__ = [ "GuiMainMenu", "GuiMainStatus", + "GuiTheme", "GuiConfigEditor", "GuiExport", "GuiItemEditor", diff --git a/nw/theme.py b/nw/gui/theme.py similarity index 99% rename from nw/theme.py rename to nw/gui/theme.py index 4f40c4b3..907a4f1d 100644 --- a/nw/theme.py +++ b/nw/gui/theme.py @@ -23,7 +23,7 @@ from nw.constants import nwAlert logger = logging.getLogger(__name__) -class Theme: +class GuiTheme: # Icons should either have a valid icon name by using Qt internal # QIcon.fromTheme, as specified here: @@ -353,4 +353,4 @@ class Theme: return confParser.get(cnfSec, cnfName) return cnfDefault -# End Class Theme +# End Class GuiTheme diff --git a/nw/guimain.py b/nw/guimain.py index b42b4070..169fa42f 100644 --- a/nw/guimain.py +++ b/nw/guimain.py @@ -24,14 +24,13 @@ from PyQt5.QtWidgets import ( ) from nw.gui import ( - GuiMainMenu, GuiMainStatus, GuiDocTree, GuiDocEditor, GuiDocViewer, - GuiDocDetails, GuiSearchBar, GuiNoticeBar, GuiDocViewDetails, - GuiConfigEditor, GuiProjectEditor, GuiExport, GuiItemEditor, - GuiTimeLineView, GuiSessionLogView + GuiMainMenu, GuiMainStatus, GuiTheme, GuiDocTree, GuiDocEditor, + GuiDocViewer, GuiDocDetails, GuiSearchBar, GuiNoticeBar, + GuiDocViewDetails, GuiConfigEditor, GuiProjectEditor, GuiExport, + GuiItemEditor, GuiTimeLineView, GuiSessionLogView ) from nw.project import NWProject, NWDoc, NWItem, NWIndex, NWBackup from nw.tools import countWords -from nw.theme import Theme from nw.constants import nwFiles, nwItemType, nwAlert logger = logging.getLogger(__name__) @@ -44,7 +43,7 @@ class GuiMain(QMainWindow): logger.info("Starting %s" % nw.__package__) logger.debug("Initialising GUI ...") self.mainConf = nw.CONFIG - self.theTheme = Theme(self) + self.theTheme = GuiTheme(self) self.theProject = NWProject(self) self.theIndex = NWIndex(self.theProject, self) self.hasProject = False