diff --git a/novelwriter/assets/icons/typicons_dark/icons.conf b/novelwriter/assets/icons/typicons_dark/icons.conf
index ccc55222..cde02134 100644
--- a/novelwriter/assets/icons/typicons_dark/icons.conf
+++ b/novelwriter/assets/icons/typicons_dark/icons.conf
@@ -78,6 +78,7 @@ status_time = typ_stopwatch-grey.svg
sticky-off = typ_pin-outline.svg
sticky-on = typ_pin.svg
up = typ_chevron-up.svg
-view_editor = typ_edit.svg
+view_build = typ_export.svg
+view_editor = mixed_edit.svg
view_novel = typ_book-grey.svg
view_outline = typ_puzzle-outline.svg
diff --git a/novelwriter/assets/icons/typicons_dark/mixed_edit.svg b/novelwriter/assets/icons/typicons_dark/mixed_edit.svg
new file mode 100644
index 00000000..fac03f3e
--- /dev/null
+++ b/novelwriter/assets/icons/typicons_dark/mixed_edit.svg
@@ -0,0 +1,52 @@
+
+
diff --git a/novelwriter/assets/icons/typicons_dark/typ_edit.svg b/novelwriter/assets/icons/typicons_dark/typ_edit.svg
deleted file mode 100644
index 652dda33..00000000
--- a/novelwriter/assets/icons/typicons_dark/typ_edit.svg
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
diff --git a/novelwriter/assets/icons/typicons_dark/typ_export.svg b/novelwriter/assets/icons/typicons_dark/typ_export.svg
new file mode 100644
index 00000000..6e36ed53
--- /dev/null
+++ b/novelwriter/assets/icons/typicons_dark/typ_export.svg
@@ -0,0 +1,16 @@
+
+
diff --git a/novelwriter/assets/icons/typicons_light/icons.conf b/novelwriter/assets/icons/typicons_light/icons.conf
index a26d18b4..85941827 100644
--- a/novelwriter/assets/icons/typicons_light/icons.conf
+++ b/novelwriter/assets/icons/typicons_light/icons.conf
@@ -78,6 +78,7 @@ status_time = typ_stopwatch-grey.svg
sticky-off = typ_pin-outline.svg
sticky-on = typ_pin.svg
up = typ_chevron-up.svg
-view_editor = typ_edit.svg
+view_build = typ_export.svg
+view_editor = mixed_edit.svg
view_novel = typ_book-grey.svg
view_outline = typ_puzzle-outline.svg
diff --git a/novelwriter/assets/icons/typicons_light/mixed_edit.svg b/novelwriter/assets/icons/typicons_light/mixed_edit.svg
new file mode 100644
index 00000000..982206ed
--- /dev/null
+++ b/novelwriter/assets/icons/typicons_light/mixed_edit.svg
@@ -0,0 +1,52 @@
+
+
diff --git a/novelwriter/assets/icons/typicons_light/typ_edit.svg b/novelwriter/assets/icons/typicons_light/typ_edit.svg
deleted file mode 100644
index 512c1592..00000000
--- a/novelwriter/assets/icons/typicons_light/typ_edit.svg
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
diff --git a/novelwriter/assets/icons/typicons_light/typ_export.svg b/novelwriter/assets/icons/typicons_light/typ_export.svg
new file mode 100644
index 00000000..537f71f9
--- /dev/null
+++ b/novelwriter/assets/icons/typicons_light/typ_export.svg
@@ -0,0 +1,38 @@
+
+
diff --git a/novelwriter/core/project.py b/novelwriter/core/project.py
index 3341e578..b791f545 100644
--- a/novelwriter/core/project.py
+++ b/novelwriter/core/project.py
@@ -87,7 +87,7 @@ class NWProject():
self.projFiles = [] # A list of all files in the content folder on load
# Project Meta
- self.projName = "" # Project name (working title)
+ self.projName = "" # Project name
self.bookTitle = "" # The final title; should only be used for exports
self.bookAuthors = [] # A list of book authors
@@ -956,8 +956,8 @@ class NWProject():
return True
def setProjectName(self, projName):
- """Set the project name (working title), This is the the title
- used for backup files etc.
+ """Set the project name, This is the the name used for backup
+ files etc.
"""
self.projName = simplified(projName)
self.setProjectChanged(True)
diff --git a/novelwriter/dialogs/preferences.py b/novelwriter/dialogs/preferences.py
index c38a0c5f..d38a4ab6 100644
--- a/novelwriter/dialogs/preferences.py
+++ b/novelwriter/dialogs/preferences.py
@@ -203,6 +203,22 @@ class GuiPreferencesGeneral(QWidget):
self.tr("Requires restart.")
)
+ # Editor Theme
+ self.guiSyntax = QComboBox()
+ self.guiSyntax.setMinimumWidth(self.mainConf.pxInt(200))
+ self.theSyntaxes = self.theTheme.listSyntax()
+ for syntaxFile, syntaxName in self.theSyntaxes:
+ self.guiSyntax.addItem(syntaxName, syntaxFile)
+ syntaxIdx = self.guiSyntax.findData(self.mainConf.guiSyntax)
+ if syntaxIdx != -1:
+ self.guiSyntax.setCurrentIndex(syntaxIdx)
+
+ self.mainForm.addRow(
+ self.tr("Editor theme"),
+ self.guiSyntax,
+ self.tr("Colour theme for the editor and viewer.")
+ )
+
# Font Family
self.guiFont = QLineEdit()
self.guiFont.setReadOnly(True)
@@ -275,6 +291,7 @@ class GuiPreferencesGeneral(QWidget):
guiLang = self.guiLang.currentData()
guiTheme = self.guiTheme.currentData()
guiIcons = self.guiIcons.currentData()
+ guiSyntax = self.guiSyntax.currentData()
guiFont = self.guiFont.text()
guiFontSize = self.guiFontSize.value()
emphLabels = self.emphLabels.isChecked()
@@ -294,6 +311,7 @@ class GuiPreferencesGeneral(QWidget):
self.mainConf.guiLang = guiLang
self.mainConf.guiTheme = guiTheme
self.mainConf.guiIcons = guiIcons
+ self.mainConf.guiSyntax = guiSyntax
self.mainConf.guiFont = guiFont
self.mainConf.guiFontSize = guiFontSize
self.mainConf.emphLabels = emphLabels
@@ -834,25 +852,6 @@ class GuiPreferencesSyntax(QWidget):
self.mainForm.setHelpTextStyle(self.theTheme.helpText)
self.setLayout(self.mainForm)
- # Highlighting Theme
- # ==================
- self.mainForm.addGroupLabel(self.tr("Highlighting Theme"))
-
- self.guiSyntax = QComboBox()
- self.guiSyntax.setMinimumWidth(self.mainConf.pxInt(200))
- self.theSyntaxes = self.theTheme.listSyntax()
- for syntaxFile, syntaxName in self.theSyntaxes:
- self.guiSyntax.addItem(syntaxName, syntaxFile)
- syntaxIdx = self.guiSyntax.findData(self.mainConf.guiSyntax)
- if syntaxIdx != -1:
- self.guiSyntax.setCurrentIndex(syntaxIdx)
-
- self.mainForm.addRow(
- self.tr("Highlighting theme"),
- self.guiSyntax,
- self.tr("Colour theme for the editor and viewer.")
- )
-
# Quotes & Dialogue
# =================
self.mainForm.addGroupLabel(self.tr("Quotes & Dialogue"))
@@ -912,9 +911,6 @@ class GuiPreferencesSyntax(QWidget):
def saveValues(self):
"""Save the values set for this tab.
"""
- # Highlighting Theme
- self.mainConf.guiSyntax = self.guiSyntax.currentData()
-
# Quotes & Dialogue
self.mainConf.highlightQuotes = self.highlightQuotes.isChecked()
self.mainConf.allowOpenSQuote = self.allowOpenSQuote.isChecked()
diff --git a/novelwriter/dialogs/projsettings.py b/novelwriter/dialogs/projsettings.py
index 2a2bb969..927f4ddd 100644
--- a/novelwriter/dialogs/projsettings.py
+++ b/novelwriter/dialogs/projsettings.py
@@ -187,7 +187,7 @@ class GuiProjectEditMain(QWidget):
self.editName.setMaximumWidth(xW)
self.editName.setText(self.theProject.projName)
self.mainForm.addRow(
- self.tr("Working title"),
+ self.tr("Project name"),
self.editName,
self.tr("Should be set only once.")
)
diff --git a/novelwriter/enum.py b/novelwriter/enum.py
index 20332b2f..fc9604e0 100644
--- a/novelwriter/enum.py
+++ b/novelwriter/enum.py
@@ -132,14 +132,10 @@ class nwState(Enum):
class nwView(Enum):
- EDITOR = 0
- PROJECT = 1
- NOVEL = 2
- OUTLINE = 3
- DETAILS = 4
- STATS = 5
- SET_PROJ = 6
- SET_MAIN = 7
+ EDITOR = 0
+ PROJECT = 1
+ NOVEL = 2
+ OUTLINE = 3
# END Enum nwView
diff --git a/novelwriter/gui/doceditor.py b/novelwriter/gui/doceditor.py
index 64c2b73d..98648ab6 100644
--- a/novelwriter/gui/doceditor.py
+++ b/novelwriter/gui/doceditor.py
@@ -131,8 +131,9 @@ class GuiDocEditor(QTextEdit):
# Editor Settings
self.setMinimumWidth(self.mainConf.pxInt(300))
- self.setAutoFillBackground(True)
self.setAcceptRichText(False)
+ self.setAutoFillBackground(True)
+ self.setFrameStyle(QFrame.NoFrame)
# Custom Shortcuts
QShortcut(
diff --git a/novelwriter/gui/docviewer.py b/novelwriter/gui/docviewer.py
index 4ec59570..4c293da5 100644
--- a/novelwriter/gui/docviewer.py
+++ b/novelwriter/gui/docviewer.py
@@ -36,7 +36,7 @@ from PyQt5.QtGui import (
)
from PyQt5.QtWidgets import (
qApp, QTextBrowser, QWidget, QScrollArea, QLabel, QHBoxLayout, QToolButton,
- QAction, QMenu
+ QAction, QMenu, QFrame
)
from novelwriter.core import ToHtml
@@ -68,6 +68,7 @@ class GuiDocViewer(QTextBrowser):
self.setAutoFillBackground(True)
self.setOpenExternalLinks(False)
self.setFocusPolicy(Qt.StrongFocus)
+ self.setFrameStyle(QFrame.NoFrame)
# Document Header and Footer
self.docHeader = GuiDocViewHeader(self)
@@ -1185,6 +1186,7 @@ class GuiDocViewDetails(QScrollArea):
self.setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded)
self.setWidgetResizable(True)
self.setMinimumHeight(self.mainConf.pxInt(50))
+ self.setFrameStyle(QFrame.NoFrame)
logger.debug("GuiDocViewDetails initialisation complete")
diff --git a/novelwriter/gui/noveltree.py b/novelwriter/gui/noveltree.py
index 0f7ac02f..d0732abe 100644
--- a/novelwriter/gui/noveltree.py
+++ b/novelwriter/gui/noveltree.py
@@ -29,7 +29,9 @@ import novelwriter
from time import time
from PyQt5.QtCore import Qt, QSize
-from PyQt5.QtWidgets import QTreeWidget, QTreeWidgetItem, QAbstractItemView
+from PyQt5.QtWidgets import (
+ QTreeWidget, QTreeWidgetItem, QAbstractItemView, QFrame
+)
from novelwriter.common import checkInt
from novelwriter.constants import nwKeyWords
@@ -60,6 +62,7 @@ class GuiNovelTree(QTreeWidget):
# Build GUI
iPx = self.theTheme.baseIconSize
+ self.setFrameStyle(QFrame.NoFrame)
self.setIconSize(QSize(iPx, iPx))
self.setIndentation(iPx)
self.setColumnCount(3)
diff --git a/novelwriter/gui/outline.py b/novelwriter/gui/outline.py
index 652af9d1..cdb4c7c2 100644
--- a/novelwriter/gui/outline.py
+++ b/novelwriter/gui/outline.py
@@ -36,7 +36,7 @@ from PyQt5.QtCore import (
from PyQt5.QtWidgets import (
QAbstractItemView, QAction, QGridLayout, QGroupBox, QHBoxLayout, QLabel,
QMenu, QScrollArea, QSplitter, QTreeWidget, QTreeWidgetItem, QVBoxLayout,
- QWidget
+ QWidget, QFrame
)
from novelwriter.enum import nwItemLayout, nwItemType, nwOutline, nwView
@@ -167,6 +167,7 @@ class GuiOutlineView(QTreeWidget):
self.optState = theOutline.theParent.theProject.optState
self.headerMenu = GuiOutlineHeaderMenu(self)
+ self.setFrameStyle(QFrame.NoFrame)
self.setSelectionBehavior(QAbstractItemView.SelectRows)
self.setSelectionMode(QAbstractItemView.SingleSelection)
self.setExpandsOnDoubleClick(False)
@@ -801,6 +802,7 @@ class GuiOutlineDetails(QScrollArea):
self.setHorizontalScrollBarPolicy(Qt.ScrollBarAsNeeded)
self.setVerticalScrollBarPolicy(Qt.ScrollBarAsNeeded)
self.setWidgetResizable(True)
+ self.setFrameStyle(QFrame.NoFrame)
self.initDetails()
diff --git a/novelwriter/gui/projtree.py b/novelwriter/gui/projtree.py
index 5d40aeae..b134b901 100644
--- a/novelwriter/gui/projtree.py
+++ b/novelwriter/gui/projtree.py
@@ -32,7 +32,7 @@ from time import time
from PyQt5.QtCore import Qt, QSize, pyqtSignal, pyqtSlot
from PyQt5.QtGui import QIcon
from PyQt5.QtWidgets import (
- QTreeWidget, QTreeWidgetItem, QAbstractItemView, QMenu, QAction
+ QTreeWidget, QTreeWidgetItem, QAbstractItemView, QMenu, QAction, QFrame
)
from novelwriter.core import NWDoc
@@ -81,6 +81,7 @@ class GuiProjectTree(QTreeWidget):
# Tree Settings
iPx = self.theTheme.baseIconSize
self.setIconSize(QSize(iPx, iPx))
+ self.setFrameStyle(QFrame.NoFrame)
self.setExpandsOnDoubleClick(False)
self.setIndentation(iPx)
self.setColumnCount(4)
diff --git a/novelwriter/gui/theme.py b/novelwriter/gui/theme.py
index e3151ea8..7c0e3ce6 100644
--- a/novelwriter/gui/theme.py
+++ b/novelwriter/gui/theme.py
@@ -462,7 +462,7 @@ class GuiIcons:
"proj_folder", "proj_note", "proj_nwx", "proj_scene", "proj_stats", "proj_title",
"search_cancel", "search_case", "search_loop", "search_preserve", "search_project",
"search_regex", "search_word", "status_idle", "status_lang", "status_lines",
- "status_stats", "status_time", "view_editor", "view_novel", "view_outline",
+ "status_stats", "status_time", "view_build", "view_editor", "view_novel", "view_outline",
# General Button Icons
"add", "backward", "check", "clear", "close", "cross", "delete", "done", "down", "edit",
diff --git a/novelwriter/gui/viewsbar.py b/novelwriter/gui/viewsbar.py
index c4dfc476..e5b627b2 100644
--- a/novelwriter/gui/viewsbar.py
+++ b/novelwriter/gui/viewsbar.py
@@ -27,7 +27,9 @@ import logging
import novelwriter
from PyQt5.QtCore import Qt, QSize, pyqtSignal
-from PyQt5.QtWidgets import QToolBar, QWidget, QSizePolicy, QAction
+from PyQt5.QtWidgets import (
+ QToolBar, QWidget, QSizePolicy, QAction, QMenu, QToolButton
+)
from novelwriter.enum import nwView
@@ -49,54 +51,86 @@ class GuiViewsBar(QToolBar):
# Style
iPx = self.mainConf.pxInt(22)
- mPx = self.mainConf.pxInt(58)
+ mPx = self.mainConf.pxInt(60)
lblFont = self.theTheme.guiFont
lblFont.setPointSizeF(0.65*self.theTheme.fontPointSize)
- self.setFont(lblFont)
self.setMovable(False)
self.setToolButtonStyle(Qt.ToolButtonTextUnderIcon)
self.setIconSize(QSize(iPx, iPx))
self.setMaximumWidth(mPx)
self.setContentsMargins(0, 0, 0, 0)
+ self.setStyleSheet("QToolBar {border: 0px;}")
stretch = QWidget(self)
stretch.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
# Actions
self.aProject = QAction(self.tr("Project"))
+ self.aProject.setFont(lblFont)
+ self.aProject.setToolTip(self.tr("Show project tree and editor"))
self.aProject.setIcon(self.theTheme.getIcon("view_editor"))
self.aProject.triggered.connect(lambda: self.viewChangeRequested.emit(nwView.PROJECT))
self.aNovel = QAction(self.tr("Novel"))
+ self.aNovel.setFont(lblFont)
+ self.aNovel.setToolTip(self.tr("Show novel tree and editor"))
self.aNovel.setIcon(self.theTheme.getIcon("view_novel"))
self.aNovel.triggered.connect(lambda: self.viewChangeRequested.emit(nwView.NOVEL))
self.aOutline = QAction(self.tr("Outline"))
+ self.aOutline.setFont(lblFont)
+ self.aOutline.setToolTip(self.tr("Show novel outline"))
self.aOutline.setIcon(self.theTheme.getIcon("view_outline"))
self.aOutline.triggered.connect(lambda: self.viewChangeRequested.emit(nwView.OUTLINE))
+ self.aBuild = QAction(self.tr("Build"))
+ self.aBuild.setFont(lblFont)
+ self.aBuild.setToolTip(self.tr("Build novel project"))
+ self.aBuild.setIcon(self.theTheme.getIcon("view_build"))
+ self.aBuild.triggered.connect(lambda: self.theParent.showBuildProjectDialog())
+
self.aDetails = QAction(self.tr("Details"))
+ self.aDetails.setFont(lblFont)
+ self.aDetails.setToolTip(self.tr("Show project details"))
self.aDetails.setIcon(self.theTheme.getIcon("proj_details"))
- self.aDetails.triggered.connect(lambda: self.viewChangeRequested.emit(nwView.DETAILS))
+ self.aDetails.triggered.connect(lambda: self.theParent.showProjectDetailsDialog())
self.aStats = QAction(self.tr("Stats"))
+ self.aStats.setFont(lblFont)
+ self.aStats.setToolTip(self.tr("Show project statistics"))
self.aStats.setIcon(self.theTheme.getIcon("proj_stats"))
- self.aStats.triggered.connect(lambda: self.viewChangeRequested.emit(nwView.STATS))
+ self.aStats.triggered.connect(lambda: self.theParent.showWritingStatsDialog())
- self.aSettings = QAction(self.tr("Settings"))
- self.aSettings.setIcon(self.theTheme.getIcon("settings"))
- self.aSettings.triggered.connect(lambda: self.viewChangeRequested.emit(nwView.SET_PROJ))
+ # Settings Menu
+ self.mSettings = QMenu()
+
+ self.aPrjSettings = QAction(self.tr("Project Settings"))
+ self.aPrjSettings.triggered.connect(lambda: self.theParent.showProjectSettingsDialog())
+ self.mSettings.addAction(self.aPrjSettings)
+
+ self.aPreferences = QAction(self.tr("Preferences"))
+ self.aPreferences.triggered.connect(lambda: self.theParent.showPreferencesDialog())
+ self.mSettings.addAction(self.aPreferences)
+
+ self.tbSettings = QToolButton(self)
+ self.tbSettings.setFont(lblFont)
+ self.tbSettings.setText(self.tr("Settings"))
+ self.tbSettings.setIcon(self.theTheme.getIcon("settings"))
+ self.tbSettings.setMenu(self.mSettings)
+ self.tbSettings.setToolButtonStyle(Qt.ToolButtonTextUnderIcon)
+ self.tbSettings.setPopupMode(QToolButton.InstantPopup)
# Assemble
self.addAction(self.aProject)
self.addAction(self.aNovel)
self.addAction(self.aOutline)
+ self.addAction(self.aBuild)
self.addWidget(stretch)
self.addAction(self.aDetails)
self.addAction(self.aStats)
- self.addAction(self.aSettings)
+ self.addWidget(self.tbSettings)
logger.debug("GuiViewsBar initialisation complete")
diff --git a/novelwriter/guimain.py b/novelwriter/guimain.py
index 8d4cdd58..ea92aacd 100644
--- a/novelwriter/guimain.py
+++ b/novelwriter/guimain.py
@@ -102,6 +102,7 @@ class GuiMain(QMainWindow):
# Sizes
mPx = self.mainConf.pxInt(4)
+ hWd = self.mainConf.pxInt(4)
# Main GUI Elements
self.statusBar = GuiMainStatus(self)
@@ -148,18 +149,21 @@ class GuiMain(QMainWindow):
self.splitView = QSplitter(Qt.Vertical)
self.splitView.addWidget(self.docViewer)
self.splitView.addWidget(self.viewMeta)
+ self.splitView.setHandleWidth(hWd)
self.splitView.setSizes(self.mainConf.getViewPanePos())
# Splitter : Document Editor / Document Viewer
self.splitDocs = QSplitter(Qt.Horizontal)
self.splitDocs.addWidget(self.docEditor)
self.splitDocs.addWidget(self.splitView)
+ self.splitDocs.setHandleWidth(hWd)
# Splitter : Project Tree / Main Tabs
self.splitMain = QSplitter(Qt.Horizontal)
- self.splitMain.setContentsMargins(0, 0, mPx, 0)
+ self.splitMain.setContentsMargins(0, 0, 0, 0)
self.splitMain.addWidget(self.treePane)
self.splitMain.addWidget(self.splitDocs)
+ self.splitMain.setHandleWidth(hWd)
self.splitMain.setSizes(self.mainConf.getMainPanePos())
# Main Stack : Editor / Outline
@@ -1389,7 +1393,7 @@ class GuiMain(QMainWindow):
return True
def _updateWindowTitle(self, projName=None):
- """Set the window title and add the project's working title.
+ """Set the window title and add the project's name.
"""
winTitle = self.mainConf.appName
if projName is not None:
@@ -1488,15 +1492,6 @@ class GuiMain(QMainWindow):
elif view == nwView.OUTLINE:
self.mainStack.setCurrentWidget(self.projView)
- elif view == nwView.DETAILS:
- self.showProjectDetailsDialog()
-
- elif view == nwView.STATS:
- self.showWritingStatsDialog()
-
- elif view == nwView.SET_PROJ:
- self.showProjectSettingsDialog()
-
return
@pyqtSlot()