diff --git a/novelwriter/core/tohtml.py b/novelwriter/core/tohtml.py index 960f8ace..8fe97628 100644 --- a/novelwriter/core/tohtml.py +++ b/novelwriter/core/tohtml.py @@ -500,7 +500,7 @@ class ToHtml(Tokenizer): else: sSynop = self._localLookup("Short Description") if self._genMode == self.M_PREVIEW: - return f"

{sSynop}: {text}

\n" + return f"

{sSynop}: {text}

\n" else: return f"

{sSynop}: {text}

\n" diff --git a/novelwriter/gui/docviewer.py b/novelwriter/gui/docviewer.py index daa4566a..99ac941f 100644 --- a/novelwriter/gui/docviewer.py +++ b/novelwriter/gui/docviewer.py @@ -30,7 +30,7 @@ import logging from enum import Enum -from PyQt5.QtCore import pyqtSignal, pyqtSlot, QPoint, Qt, QUrl +from PyQt5.QtCore import QPoint, Qt, QUrl, pyqtSignal, pyqtSlot from PyQt5.QtGui import ( QCursor, QFont, QMouseEvent, QPalette, QResizeEvent, QTextCursor, QTextOption @@ -44,7 +44,7 @@ from novelwriter import CONFIG, SHARED from novelwriter.common import cssCol from novelwriter.constants import nwHeaders, nwUnicode from novelwriter.core.tohtml import ToHtml -from novelwriter.enum import nwItemType, nwDocAction, nwDocMode +from novelwriter.enum import nwDocAction, nwDocMode, nwItemType from novelwriter.error import logException from novelwriter.extensions.eventfilters import WheelEventFilter from novelwriter.extensions.modified import NIconToolButton @@ -479,6 +479,7 @@ class GuiDocViewer(QTextBrowser): colKeys = cssCol(SHARED.theme.colKey) colOpts = cssCol(SHARED.theme.colOpt) colHide = cssCol(SHARED.theme.colHidden) + colNote = cssCol(SHARED.theme.colNote) colMods = cssCol(SHARED.theme.colMod) self.document().setDefaultStyleSheet( f"body {{color: {colText};}}\n" @@ -488,7 +489,8 @@ class GuiDocViewer(QTextBrowser): f".tags {{color: {colKeys};}}\n" f".optional {{color: {colOpts};}}\n" f".comment {{color: {colHide};}}\n" - f".synopsis {{color: {colMods};}}\n" + f".note {{color: {colNote};}}\n" + f".modifier {{color: {colMods};}}\n" ".title {text-align: center;}\n" ) diff --git a/tests/test_core/test_core_tohtml.py b/tests/test_core/test_core_tohtml.py index c2d6def1..b7420081 100644 --- a/tests/test_core/test_core_tohtml.py +++ b/tests/test_core/test_core_tohtml.py @@ -702,10 +702,10 @@ def testCoreToHtml_Format(mockGUI): html.setPreview(True) assert html._formatSynopsis("synopsis text", True) == ( - "

Synopsis: synopsis text

\n" + "

Synopsis: synopsis text

\n" ) assert html._formatSynopsis("short text", False) == ( - "

Short Description: short text

\n" + "

Short Description: short text

\n" ) assert html._formatComments("comment text") == ( "

comment text

\n" diff --git a/tests/test_gui/test_gui_theme.py b/tests/test_gui/test_gui_theme.py index 0490eabf..1402e309 100644 --- a/tests/test_gui/test_gui_theme.py +++ b/tests/test_gui/test_gui_theme.py @@ -20,20 +20,20 @@ along with this program. If not, see . """ from __future__ import annotations -import pytest - from pathlib import Path -from mocked import causeOSError -from tools import writeFile +import pytest from PyQt5.QtGui import QColor, QIcon, QPalette, QPixmap from PyQt5.QtWidgets import QApplication from novelwriter import CONFIG, SHARED -from novelwriter.enum import nwItemClass, nwItemLayout, nwItemType from novelwriter.common import NWConfigParser from novelwriter.constants import nwLabels +from novelwriter.enum import nwItemClass, nwItemLayout, nwItemType + +from tests.mocked import causeOSError +from tests.tools import writeFile @pytest.mark.gui @@ -271,9 +271,9 @@ def testGuiTheme_Syntax(qtbot, monkeypatch, nwGUI): # Check some values assert mainTheme.syntaxName == "Default Dark" - assert mainTheme.colBack == QColor(54, 54, 54) - assert mainTheme.colText == QColor(199, 207, 208) - assert mainTheme.colLink == QColor(184, 200, 0) + assert mainTheme.colBack == QColor(42, 42, 42) + assert mainTheme.colText == QColor(204, 204, 204) + assert mainTheme.colLink == QColor(102, 153, 204) # qtbot.stop()