novelWriter 2.4.4__py3-none-any.whl → 2.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {novelWriter-2.4.4.dist-info → novelWriter-2.5.dist-info}/METADATA +4 -5
- {novelWriter-2.4.4.dist-info → novelWriter-2.5.dist-info}/RECORD +121 -111
- {novelWriter-2.4.4.dist-info → novelWriter-2.5.dist-info}/WHEEL +1 -1
- novelwriter/__init__.py +33 -39
- novelwriter/assets/i18n/nw_de_DE.qm +0 -0
- novelwriter/assets/i18n/nw_en_US.qm +0 -0
- novelwriter/assets/i18n/nw_es_419.qm +0 -0
- novelwriter/assets/i18n/nw_fr_FR.qm +0 -0
- novelwriter/assets/i18n/nw_it_IT.qm +0 -0
- novelwriter/assets/i18n/nw_ja_JP.qm +0 -0
- novelwriter/assets/i18n/nw_nb_NO.qm +0 -0
- novelwriter/assets/i18n/nw_nl_NL.qm +0 -0
- novelwriter/assets/i18n/nw_pl_PL.qm +0 -0
- novelwriter/assets/i18n/nw_pt_BR.qm +0 -0
- novelwriter/assets/i18n/nw_zh_CN.qm +0 -0
- novelwriter/assets/i18n/project_en_GB.json +1 -0
- novelwriter/assets/i18n/project_pl_PL.json +116 -0
- novelwriter/assets/icons/typicons_dark/icons.conf +2 -0
- novelwriter/assets/icons/typicons_dark/nw_font.svg +4 -0
- novelwriter/assets/icons/typicons_dark/nw_quote.svg +4 -0
- novelwriter/assets/icons/typicons_light/icons.conf +2 -0
- novelwriter/assets/icons/typicons_light/nw_font.svg +4 -0
- novelwriter/assets/icons/typicons_light/nw_quote.svg +4 -0
- novelwriter/assets/manual.pdf +0 -0
- novelwriter/assets/sample.zip +0 -0
- novelwriter/assets/syntax/cyberpunk_night.conf +5 -3
- novelwriter/assets/syntax/default_dark.conf +32 -18
- novelwriter/assets/syntax/default_light.conf +24 -10
- novelwriter/assets/syntax/dracula.conf +44 -0
- novelwriter/assets/syntax/grey_dark.conf +5 -4
- novelwriter/assets/syntax/grey_light.conf +5 -4
- novelwriter/assets/syntax/light_owl.conf +7 -6
- novelwriter/assets/syntax/night_owl.conf +7 -6
- novelwriter/assets/syntax/snazzy.conf +42 -0
- novelwriter/assets/syntax/solarized_dark.conf +4 -3
- novelwriter/assets/syntax/solarized_light.conf +4 -3
- novelwriter/assets/syntax/tango.conf +27 -11
- novelwriter/assets/syntax/tomorrow.conf +6 -5
- novelwriter/assets/syntax/tomorrow_night.conf +7 -6
- novelwriter/assets/syntax/tomorrow_night_blue.conf +6 -5
- novelwriter/assets/syntax/tomorrow_night_bright.conf +6 -5
- novelwriter/assets/syntax/tomorrow_night_eighties.conf +6 -5
- novelwriter/assets/text/credits_en.htm +52 -41
- novelwriter/assets/themes/cyberpunk_night.conf +3 -0
- novelwriter/assets/themes/default_dark.conf +2 -0
- novelwriter/assets/themes/default_light.conf +2 -0
- novelwriter/assets/themes/dracula.conf +48 -0
- novelwriter/assets/themes/solarized_dark.conf +2 -0
- novelwriter/assets/themes/solarized_light.conf +2 -0
- novelwriter/common.py +33 -12
- novelwriter/config.py +184 -98
- novelwriter/constants.py +47 -35
- novelwriter/core/buildsettings.py +68 -69
- novelwriter/core/coretools.py +5 -23
- novelwriter/core/docbuild.py +52 -40
- novelwriter/core/document.py +3 -5
- novelwriter/core/index.py +115 -45
- novelwriter/core/item.py +8 -19
- novelwriter/core/options.py +2 -4
- novelwriter/core/project.py +37 -61
- novelwriter/core/projectdata.py +1 -3
- novelwriter/core/projectxml.py +12 -15
- novelwriter/core/sessions.py +3 -5
- novelwriter/core/spellcheck.py +4 -9
- novelwriter/core/status.py +211 -164
- novelwriter/core/storage.py +0 -8
- novelwriter/core/tohtml.py +139 -105
- novelwriter/core/tokenizer.py +278 -122
- novelwriter/core/{tomd.py → tomarkdown.py} +97 -78
- novelwriter/core/toodt.py +257 -166
- novelwriter/core/toqdoc.py +419 -0
- novelwriter/core/tree.py +5 -7
- novelwriter/dialogs/about.py +11 -18
- novelwriter/dialogs/docmerge.py +17 -19
- novelwriter/dialogs/docsplit.py +17 -19
- novelwriter/dialogs/editlabel.py +6 -10
- novelwriter/dialogs/preferences.py +200 -164
- novelwriter/dialogs/projectsettings.py +225 -189
- novelwriter/dialogs/quotes.py +12 -9
- novelwriter/dialogs/wordlist.py +9 -15
- novelwriter/enum.py +35 -30
- novelwriter/error.py +8 -15
- novelwriter/extensions/configlayout.py +55 -21
- novelwriter/extensions/eventfilters.py +1 -5
- novelwriter/extensions/modified.py +58 -14
- novelwriter/extensions/novelselector.py +1 -3
- novelwriter/extensions/pagedsidebar.py +9 -12
- novelwriter/extensions/{circularprogress.py → progressbars.py} +30 -8
- novelwriter/extensions/statusled.py +40 -26
- novelwriter/extensions/switch.py +4 -6
- novelwriter/extensions/switchbox.py +7 -6
- novelwriter/extensions/versioninfo.py +3 -9
- novelwriter/gui/doceditor.py +120 -139
- novelwriter/gui/dochighlight.py +231 -186
- novelwriter/gui/docviewer.py +69 -108
- novelwriter/gui/docviewerpanel.py +3 -10
- novelwriter/gui/editordocument.py +1 -3
- novelwriter/gui/itemdetails.py +7 -11
- novelwriter/gui/mainmenu.py +22 -18
- novelwriter/gui/noveltree.py +11 -24
- novelwriter/gui/outline.py +15 -26
- novelwriter/gui/projtree.py +35 -60
- novelwriter/gui/search.py +10 -3
- novelwriter/gui/sidebar.py +2 -6
- novelwriter/gui/statusbar.py +29 -37
- novelwriter/gui/theme.py +26 -48
- novelwriter/guimain.py +162 -160
- novelwriter/shared.py +36 -32
- novelwriter/text/patterns.py +113 -0
- novelwriter/tools/dictionaries.py +10 -20
- novelwriter/tools/lipsum.py +10 -16
- novelwriter/tools/manusbuild.py +9 -11
- novelwriter/tools/manuscript.py +71 -145
- novelwriter/tools/manussettings.py +71 -75
- novelwriter/tools/noveldetails.py +16 -21
- novelwriter/tools/welcome.py +21 -26
- novelwriter/tools/writingstats.py +9 -12
- novelwriter/types.py +49 -4
- novelwriter/extensions/simpleprogress.py +0 -55
- {novelWriter-2.4.4.dist-info → novelWriter-2.5.dist-info}/LICENSE.md +0 -0
- {novelWriter-2.4.4.dist-info → novelWriter-2.5.dist-info}/entry_points.txt +0 -0
- {novelWriter-2.4.4.dist-info → novelWriter-2.5.dist-info}/top_level.txt +0 -0
novelwriter/gui/theme.py
CHANGED
@@ -46,12 +46,11 @@ STYLES_MIN_TOOLBUTTON = "minimalToolButton"
|
|
46
46
|
STYLES_BIG_TOOLBUTTON = "bigToolButton"
|
47
47
|
|
48
48
|
|
49
|
-
# =============================================================================================== #
|
50
|
-
# Gui Theme Class
|
51
|
-
# Handles the look and feel of novelWriter
|
52
|
-
# =============================================================================================== #
|
53
|
-
|
54
49
|
class GuiTheme:
|
50
|
+
"""Gui Theme Class
|
51
|
+
|
52
|
+
Handles the look and feel of novelWriter.
|
53
|
+
"""
|
55
54
|
|
56
55
|
def __init__(self) -> None:
|
57
56
|
|
@@ -76,6 +75,8 @@ class GuiTheme:
|
|
76
75
|
self.statUnsaved = QColor(0, 0, 0)
|
77
76
|
self.statSaved = QColor(0, 0, 0)
|
78
77
|
self.helpText = QColor(0, 0, 0)
|
78
|
+
self.fadedText = QColor(0, 0, 0)
|
79
|
+
self.errorText = QColor(255, 0, 0)
|
79
80
|
|
80
81
|
# Loaded Syntax Settings
|
81
82
|
# ======================
|
@@ -97,11 +98,12 @@ class GuiTheme:
|
|
97
98
|
self.colHeadH = QColor(0, 0, 0)
|
98
99
|
self.colEmph = QColor(0, 0, 0)
|
99
100
|
self.colDialN = QColor(0, 0, 0)
|
100
|
-
self.
|
101
|
-
self.colDialS = QColor(0, 0, 0)
|
101
|
+
self.colDialA = QColor(0, 0, 0)
|
102
102
|
self.colHidden = QColor(0, 0, 0)
|
103
|
+
self.colNote = QColor(0, 0, 0)
|
103
104
|
self.colCode = QColor(0, 0, 0)
|
104
105
|
self.colKey = QColor(0, 0, 0)
|
106
|
+
self.colTag = QColor(0, 0, 0)
|
105
107
|
self.colVal = QColor(0, 0, 0)
|
106
108
|
self.colOpt = QColor(0, 0, 0)
|
107
109
|
self.colSpell = QColor(0, 0, 0)
|
@@ -113,9 +115,6 @@ class GuiTheme:
|
|
113
115
|
# Class Setup
|
114
116
|
# ===========
|
115
117
|
|
116
|
-
# Init GUI Font
|
117
|
-
self._setGuiFont()
|
118
|
-
|
119
118
|
# Load Themes
|
120
119
|
self._guiPalette = QPalette()
|
121
120
|
self._themeList: list[tuple[str, str]] = []
|
@@ -265,6 +264,8 @@ class GuiTheme:
|
|
265
264
|
sec = "GUI"
|
266
265
|
if parser.has_section(sec):
|
267
266
|
self.helpText = self._parseColour(parser, sec, "helptext")
|
267
|
+
self.fadedText = self._parseColour(parser, sec, "fadedtext")
|
268
|
+
self.errorText = self._parseColour(parser, sec, "errortext")
|
268
269
|
self.statNone = self._parseColour(parser, sec, "statusnone")
|
269
270
|
self.statUnsaved = self._parseColour(parser, sec, "statusunsaved")
|
270
271
|
self.statSaved = self._parseColour(parser, sec, "statussaved")
|
@@ -282,6 +283,10 @@ class GuiTheme:
|
|
282
283
|
else:
|
283
284
|
helpLCol = backLNess + 0.65*(textLNess - backLNess)
|
284
285
|
self.helpText = QColor.fromHsl(0, 0, int(255*helpLCol))
|
286
|
+
logger.debug(
|
287
|
+
"Computed help text colour: rgb(%d, %d, %d)",
|
288
|
+
self.helpText.red(), self.helpText.green(), self.helpText.blue()
|
289
|
+
)
|
285
290
|
|
286
291
|
# Icons
|
287
292
|
defaultIcons = "typicons_light" if backLNess >= 0.5 else "typicons_dark"
|
@@ -339,12 +344,13 @@ class GuiTheme:
|
|
339
344
|
self.colHead = self._parseColour(confParser, cnfSec, "headertext")
|
340
345
|
self.colHeadH = self._parseColour(confParser, cnfSec, "headertag")
|
341
346
|
self.colEmph = self._parseColour(confParser, cnfSec, "emphasis")
|
342
|
-
self.colDialN = self._parseColour(confParser, cnfSec, "
|
343
|
-
self.
|
344
|
-
self.colDialS = self._parseColour(confParser, cnfSec, "singlequotes")
|
347
|
+
self.colDialN = self._parseColour(confParser, cnfSec, "dialog")
|
348
|
+
self.colDialA = self._parseColour(confParser, cnfSec, "altdialog")
|
345
349
|
self.colHidden = self._parseColour(confParser, cnfSec, "hidden")
|
350
|
+
self.colNote = self._parseColour(confParser, cnfSec, "note")
|
346
351
|
self.colCode = self._parseColour(confParser, cnfSec, "shortcode")
|
347
352
|
self.colKey = self._parseColour(confParser, cnfSec, "keyword")
|
353
|
+
self.colTag = self._parseColour(confParser, cnfSec, "tag")
|
348
354
|
self.colVal = self._parseColour(confParser, cnfSec, "value")
|
349
355
|
self.colOpt = self._parseColour(confParser, cnfSec, "optional")
|
350
356
|
self.colSpell = self._parseColour(confParser, cnfSec, "spellcheckline")
|
@@ -401,27 +407,8 @@ class GuiTheme:
|
|
401
407
|
self.statUnsaved = QColor(200, 15, 39)
|
402
408
|
self.statSaved = QColor(2, 133, 37)
|
403
409
|
self.helpText = QColor(0, 0, 0)
|
404
|
-
|
405
|
-
|
406
|
-
def _setGuiFont(self) -> None:
|
407
|
-
"""Update the GUI's font style from settings."""
|
408
|
-
font = QFont()
|
409
|
-
fontDB = QFontDatabase()
|
410
|
-
if CONFIG.guiFont not in fontDB.families():
|
411
|
-
if CONFIG.osWindows and "Arial" in fontDB.families():
|
412
|
-
# On Windows we default to Arial if possible
|
413
|
-
font.setFamily("Arial")
|
414
|
-
font.setPointSize(10)
|
415
|
-
else:
|
416
|
-
font = fontDB.systemFont(QFontDatabase.SystemFont.GeneralFont)
|
417
|
-
CONFIG.guiFont = font.family()
|
418
|
-
CONFIG.guiFontSize = font.pointSize()
|
419
|
-
else:
|
420
|
-
font.setFamily(CONFIG.guiFont)
|
421
|
-
font.setPointSize(CONFIG.guiFontSize)
|
422
|
-
|
423
|
-
QApplication.setFont(font)
|
424
|
-
|
410
|
+
self.fadedText = QColor(128, 128, 128)
|
411
|
+
self.errorText = QColor(255, 0, 0)
|
425
412
|
return
|
426
413
|
|
427
414
|
def _listConf(self, targetDict: dict, checkDir: Path) -> bool:
|
@@ -480,12 +467,6 @@ class GuiTheme:
|
|
480
467
|
|
481
468
|
return
|
482
469
|
|
483
|
-
# End Class GuiTheme
|
484
|
-
|
485
|
-
|
486
|
-
# =============================================================================================== #
|
487
|
-
# Icons Class
|
488
|
-
# =============================================================================================== #
|
489
470
|
|
490
471
|
class GuiIcons:
|
491
472
|
"""The icon class manages the content of the assets/icons folder,
|
@@ -523,9 +504,9 @@ class GuiIcons:
|
|
523
504
|
|
524
505
|
# General Button Icons
|
525
506
|
"add", "add_document", "backward", "bookmark", "browse", "checked", "close", "cross",
|
526
|
-
"document", "down", "edit", "export", "forward", "import", "list", "maximise",
|
527
|
-
"minimise", "more", "noncheckable", "open", "panel", "
|
528
|
-
"search_replace", "search", "settings", "star", "unchecked", "up", "view",
|
507
|
+
"document", "down", "edit", "export", "font", "forward", "import", "list", "maximise",
|
508
|
+
"menu", "minimise", "more", "noncheckable", "open", "panel", "quote", "refresh", "remove",
|
509
|
+
"revert", "search_replace", "search", "settings", "star", "unchecked", "up", "view",
|
529
510
|
|
530
511
|
# Switches
|
531
512
|
"sticky-on", "sticky-off",
|
@@ -793,12 +774,9 @@ class GuiIcons:
|
|
793
774
|
|
794
775
|
return self._noIcon
|
795
776
|
|
796
|
-
# END Class GuiIcons
|
797
|
-
|
798
777
|
|
799
|
-
#
|
800
|
-
#
|
801
|
-
# =============================================================================================== #
|
778
|
+
# Module Functions
|
779
|
+
# ================
|
802
780
|
|
803
781
|
|
804
782
|
def _sortTheme(data: tuple[str, str]) -> str:
|