novelWriter 2.6.3__py3-none-any.whl → 2.7rc1__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/__init__.py +98 -75
- novelwriter/assets/i18n/project_en_GB.json +2 -0
- novelwriter/assets/icons/font_awesome.icons +109 -0
- novelwriter/assets/icons/material_filled_bold.icons +109 -0
- novelwriter/assets/icons/material_filled_normal.icons +109 -0
- novelwriter/assets/icons/material_filled_thin.icons +109 -0
- novelwriter/assets/icons/material_rounded_bold.icons +109 -0
- novelwriter/assets/icons/material_rounded_normal.icons +109 -0
- novelwriter/assets/icons/material_rounded_thin.icons +109 -0
- novelwriter/assets/icons/remix_filled.icons +109 -0
- novelwriter/assets/icons/remix_outline.icons +109 -0
- novelwriter/assets/images/splash.png +0 -0
- novelwriter/assets/manual.pdf +0 -0
- novelwriter/assets/{manual_fr_FR.pdf → manual_fr.pdf} +0 -0
- novelwriter/assets/sample.zip +0 -0
- novelwriter/assets/syntax/cyberpunk_night.conf +1 -1
- novelwriter/assets/syntax/snazzy.conf +3 -3
- novelwriter/assets/text/credits_en.htm +6 -6
- novelwriter/assets/themes/cyberpunk_night.conf +23 -7
- novelwriter/assets/themes/default_dark.conf +20 -4
- novelwriter/assets/themes/default_light.conf +21 -5
- novelwriter/assets/themes/dracula.conf +20 -4
- novelwriter/assets/themes/snazzy.conf +48 -0
- novelwriter/assets/themes/solarized_dark.conf +24 -8
- novelwriter/assets/themes/solarized_light.conf +22 -6
- novelwriter/common.py +43 -27
- novelwriter/config.py +201 -139
- novelwriter/constants.py +67 -36
- novelwriter/core/buildsettings.py +25 -16
- novelwriter/core/coretools.py +52 -41
- novelwriter/core/docbuild.py +20 -13
- novelwriter/core/document.py +2 -2
- novelwriter/core/index.py +166 -432
- novelwriter/core/indexdata.py +406 -0
- novelwriter/core/item.py +50 -32
- novelwriter/core/itemmodel.py +43 -38
- novelwriter/core/novelmodel.py +225 -0
- novelwriter/core/options.py +1 -1
- novelwriter/core/project.py +24 -25
- novelwriter/core/projectdata.py +47 -29
- novelwriter/core/projectxml.py +18 -8
- novelwriter/core/sessions.py +32 -15
- novelwriter/core/spellcheck.py +4 -3
- novelwriter/core/status.py +12 -15
- novelwriter/core/storage.py +1 -1
- novelwriter/core/tree.py +55 -13
- novelwriter/dialogs/about.py +19 -22
- novelwriter/dialogs/docmerge.py +23 -24
- novelwriter/dialogs/docsplit.py +26 -26
- novelwriter/dialogs/editlabel.py +19 -20
- novelwriter/dialogs/preferences.py +143 -69
- novelwriter/dialogs/projectsettings.py +51 -54
- novelwriter/dialogs/quotes.py +14 -19
- novelwriter/dialogs/wordlist.py +25 -30
- novelwriter/enum.py +8 -0
- novelwriter/error.py +16 -16
- novelwriter/extensions/configlayout.py +24 -20
- novelwriter/extensions/eventfilters.py +9 -5
- novelwriter/extensions/modified.py +34 -15
- novelwriter/extensions/novelselector.py +18 -5
- novelwriter/extensions/pagedsidebar.py +39 -49
- novelwriter/extensions/progressbars.py +10 -8
- novelwriter/extensions/statusled.py +6 -13
- novelwriter/extensions/switch.py +31 -41
- novelwriter/extensions/switchbox.py +8 -3
- novelwriter/extensions/versioninfo.py +4 -4
- novelwriter/formats/shared.py +1 -1
- novelwriter/formats/todocx.py +14 -10
- novelwriter/formats/tohtml.py +7 -5
- novelwriter/formats/tokenizer.py +37 -33
- novelwriter/formats/tomarkdown.py +6 -2
- novelwriter/formats/toodt.py +27 -22
- novelwriter/formats/toqdoc.py +19 -14
- novelwriter/formats/toraw.py +6 -2
- novelwriter/gui/doceditor.py +314 -305
- novelwriter/gui/dochighlight.py +46 -45
- novelwriter/gui/docviewer.py +102 -104
- novelwriter/gui/docviewerpanel.py +47 -51
- novelwriter/gui/editordocument.py +8 -5
- novelwriter/gui/itemdetails.py +11 -14
- novelwriter/gui/mainmenu.py +146 -145
- novelwriter/gui/noveltree.py +246 -406
- novelwriter/gui/outline.py +141 -72
- novelwriter/gui/projtree.py +139 -132
- novelwriter/gui/search.py +34 -31
- novelwriter/gui/sidebar.py +13 -18
- novelwriter/gui/statusbar.py +27 -21
- novelwriter/gui/theme.py +554 -436
- novelwriter/guimain.py +56 -38
- novelwriter/shared.py +32 -23
- novelwriter/splash.py +74 -0
- novelwriter/text/comments.py +70 -0
- novelwriter/text/patterns.py +4 -4
- novelwriter/tools/dictionaries.py +20 -29
- novelwriter/tools/lipsum.py +18 -18
- novelwriter/tools/manusbuild.py +39 -42
- novelwriter/tools/manuscript.py +102 -115
- novelwriter/tools/manussettings.py +116 -96
- novelwriter/tools/noveldetails.py +60 -72
- novelwriter/tools/welcome.py +57 -75
- novelwriter/tools/writingstats.py +112 -102
- novelwriter/types.py +5 -7
- {novelWriter-2.6.3.dist-info → novelwriter-2.7rc1.dist-info}/METADATA +6 -6
- novelwriter-2.7rc1.dist-info/RECORD +162 -0
- {novelWriter-2.6.3.dist-info → novelwriter-2.7rc1.dist-info}/WHEEL +1 -1
- novelWriter-2.6.3.dist-info/RECORD +0 -363
- novelwriter/assets/icons/typicons_dark/README.md +0 -29
- novelwriter/assets/icons/typicons_dark/icons.conf +0 -134
- novelwriter/assets/icons/typicons_dark/mixed_copy.svg +0 -4
- novelwriter/assets/icons/typicons_dark/mixed_document-chapter.svg +0 -12
- novelwriter/assets/icons/typicons_dark/mixed_document-new.svg +0 -6
- novelwriter/assets/icons/typicons_dark/mixed_document-note.svg +0 -12
- novelwriter/assets/icons/typicons_dark/mixed_document-scene.svg +0 -12
- novelwriter/assets/icons/typicons_dark/mixed_document-section.svg +0 -12
- novelwriter/assets/icons/typicons_dark/mixed_document-title.svg +0 -12
- novelwriter/assets/icons/typicons_dark/mixed_edit.svg +0 -4
- novelwriter/assets/icons/typicons_dark/mixed_import.svg +0 -5
- novelwriter/assets/icons/typicons_dark/mixed_input-checked.svg +0 -5
- novelwriter/assets/icons/typicons_dark/mixed_input-none.svg +0 -5
- novelwriter/assets/icons/typicons_dark/mixed_input-unchecked.svg +0 -5
- novelwriter/assets/icons/typicons_dark/mixed_margin-bottom.svg +0 -6
- novelwriter/assets/icons/typicons_dark/mixed_margin-left.svg +0 -6
- novelwriter/assets/icons/typicons_dark/mixed_margin-right.svg +0 -6
- novelwriter/assets/icons/typicons_dark/mixed_margin-top.svg +0 -6
- novelwriter/assets/icons/typicons_dark/mixed_search-replace.svg +0 -6
- novelwriter/assets/icons/typicons_dark/mixed_size-height.svg +0 -6
- novelwriter/assets/icons/typicons_dark/mixed_size-width.svg +0 -6
- novelwriter/assets/icons/typicons_dark/nw_deco-h0.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_deco-h1.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_deco-h2-narrow.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_deco-h2.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_deco-h3-narrow.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_deco-h3.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_deco-h4-narrow.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_deco-h4.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_deco-note.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_deco-noveltree-more.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_font.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_panel.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_quote.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_search-case.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_search-preserve.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_search-regex.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_search-word.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_tb-bold-md.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_tb-bold.svg +0 -6
- novelwriter/assets/icons/typicons_dark/nw_tb-italic-md.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_tb-italic.svg +0 -6
- novelwriter/assets/icons/typicons_dark/nw_tb-mark.svg +0 -7
- novelwriter/assets/icons/typicons_dark/nw_tb-strike-md.svg +0 -4
- novelwriter/assets/icons/typicons_dark/nw_tb-strike.svg +0 -6
- novelwriter/assets/icons/typicons_dark/nw_tb-subscript.svg +0 -7
- novelwriter/assets/icons/typicons_dark/nw_tb-superscript.svg +0 -7
- novelwriter/assets/icons/typicons_dark/nw_tb-underline.svg +0 -7
- novelwriter/assets/icons/typicons_dark/nw_toolbar.svg +0 -5
- novelwriter/assets/icons/typicons_dark/typ_arrow-down-thick-grey.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_arrow-forward.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_arrow-maximise.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_arrow-minimise.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_arrow-repeat-grey.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_book-grey.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_book.svg +0 -6
- novelwriter/assets/icons/typicons_dark/typ_bookmark.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_calendar.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_cancel-grey.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_cancel.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_chart-bar-grey.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_chevron-down.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_chevron-left.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_chevron-right.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_chevron-up.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_cog.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_delete-full.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_delete.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_directions-full.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_document-add.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_document-text.svg +0 -8
- novelwriter/assets/icons/typicons_dark/typ_document.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_export-grey.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_export.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_eye.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_flag.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_folder-open.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_folder.svg +0 -5
- novelwriter/assets/icons/typicons_dark/typ_globe-grey.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_key.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_lightbulb-full.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_location.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_media-pause-grey.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_media-record-outline.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_media-record.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_minus.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_pencil.svg +0 -5
- novelwriter/assets/icons/typicons_dark/typ_pin-outline.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_pin.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_plus.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_puzzle-outline.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_puzzle.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_refresh-flipped.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_refresh.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_search-grey.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_search.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_star.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_stopwatch-grey.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_th-dot-menu.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_th-dot-more.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_th-list-grey.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_th-list.svg +0 -9
- novelwriter/assets/icons/typicons_dark/typ_times.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_trash.svg +0 -5
- novelwriter/assets/icons/typicons_dark/typ_unfold-hidden.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_unfold-visible.svg +0 -4
- novelwriter/assets/icons/typicons_dark/typ_user.svg +0 -5
- novelwriter/assets/icons/typicons_dark/typ_warning-full.svg +0 -4
- novelwriter/assets/icons/typicons_light/README.md +0 -29
- novelwriter/assets/icons/typicons_light/icons.conf +0 -134
- novelwriter/assets/icons/typicons_light/mixed_copy.svg +0 -4
- novelwriter/assets/icons/typicons_light/mixed_document-chapter.svg +0 -12
- novelwriter/assets/icons/typicons_light/mixed_document-new.svg +0 -6
- novelwriter/assets/icons/typicons_light/mixed_document-note.svg +0 -12
- novelwriter/assets/icons/typicons_light/mixed_document-scene.svg +0 -12
- novelwriter/assets/icons/typicons_light/mixed_document-section.svg +0 -12
- novelwriter/assets/icons/typicons_light/mixed_document-title.svg +0 -12
- novelwriter/assets/icons/typicons_light/mixed_edit.svg +0 -4
- novelwriter/assets/icons/typicons_light/mixed_import.svg +0 -5
- novelwriter/assets/icons/typicons_light/mixed_input-checked.svg +0 -5
- novelwriter/assets/icons/typicons_light/mixed_input-none.svg +0 -5
- novelwriter/assets/icons/typicons_light/mixed_input-unchecked.svg +0 -5
- novelwriter/assets/icons/typicons_light/mixed_margin-bottom.svg +0 -6
- novelwriter/assets/icons/typicons_light/mixed_margin-left.svg +0 -6
- novelwriter/assets/icons/typicons_light/mixed_margin-right.svg +0 -6
- novelwriter/assets/icons/typicons_light/mixed_margin-top.svg +0 -6
- novelwriter/assets/icons/typicons_light/mixed_search-replace.svg +0 -6
- novelwriter/assets/icons/typicons_light/mixed_size-height.svg +0 -6
- novelwriter/assets/icons/typicons_light/mixed_size-width.svg +0 -6
- novelwriter/assets/icons/typicons_light/nw_deco-h0.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_deco-h1.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_deco-h2-narrow.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_deco-h2.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_deco-h3-narrow.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_deco-h3.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_deco-h4-narrow.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_deco-h4.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_deco-note.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_deco-noveltree-more.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_font.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_panel.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_quote.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_search-case.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_search-preserve.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_search-regex.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_search-word.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_tb-bold-md.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_tb-bold.svg +0 -6
- novelwriter/assets/icons/typicons_light/nw_tb-italic-md.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_tb-italic.svg +0 -6
- novelwriter/assets/icons/typicons_light/nw_tb-mark.svg +0 -7
- novelwriter/assets/icons/typicons_light/nw_tb-strike-md.svg +0 -4
- novelwriter/assets/icons/typicons_light/nw_tb-strike.svg +0 -6
- novelwriter/assets/icons/typicons_light/nw_tb-subscript.svg +0 -7
- novelwriter/assets/icons/typicons_light/nw_tb-superscript.svg +0 -7
- novelwriter/assets/icons/typicons_light/nw_tb-underline.svg +0 -7
- novelwriter/assets/icons/typicons_light/nw_toolbar.svg +0 -5
- novelwriter/assets/icons/typicons_light/typ_arrow-down-thick-grey.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_arrow-forward.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_arrow-maximise.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_arrow-minimise.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_arrow-repeat-grey.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_book-grey.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_book.svg +0 -6
- novelwriter/assets/icons/typicons_light/typ_bookmark.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_calendar.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_cancel-grey.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_cancel.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_chart-bar-grey.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_chevron-down.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_chevron-left.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_chevron-right.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_chevron-up.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_cog.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_delete-full.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_delete.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_directions-full.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_document-add.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_document-text.svg +0 -5
- novelwriter/assets/icons/typicons_light/typ_document.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_export-grey.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_export.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_eye.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_flag.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_folder-open.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_folder.svg +0 -5
- novelwriter/assets/icons/typicons_light/typ_globe-grey.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_key.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_lightbulb-full.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_location.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_media-pause-grey.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_media-record-outline.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_media-record.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_minus.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_pencil.svg +0 -5
- novelwriter/assets/icons/typicons_light/typ_pin-outline.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_pin.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_plus.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_puzzle-outline.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_puzzle.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_refresh-flipped.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_refresh.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_search-grey.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_search.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_star.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_stopwatch-grey.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_th-dot-menu.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_th-dot-more.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_th-list-grey.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_th-list.svg +0 -9
- novelwriter/assets/icons/typicons_light/typ_times.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_trash.svg +0 -5
- novelwriter/assets/icons/typicons_light/typ_unfold-hidden.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_unfold-visible.svg +0 -4
- novelwriter/assets/icons/typicons_light/typ_user.svg +0 -5
- novelwriter/assets/icons/typicons_light/typ_warning-full.svg +0 -4
- {novelWriter-2.6.3.dist-info → novelwriter-2.7rc1.dist-info}/entry_points.txt +0 -0
- {novelWriter-2.6.3.dist-info → novelwriter-2.7rc1.dist-info/licenses}/LICENSE.md +0 -0
- {novelWriter-2.6.3.dist-info → novelwriter-2.7rc1.dist-info}/top_level.txt +0 -0
@@ -27,9 +27,9 @@ import logging
|
|
27
27
|
|
28
28
|
from typing import TYPE_CHECKING
|
29
29
|
|
30
|
-
from
|
31
|
-
from
|
32
|
-
from
|
30
|
+
from PyQt6.QtCore import QEvent, pyqtSignal, pyqtSlot
|
31
|
+
from PyQt6.QtGui import QFont, QIcon, QSyntaxHighlighter, QTextCharFormat, QTextDocument
|
32
|
+
from PyQt6.QtWidgets import (
|
33
33
|
QAbstractButton, QAbstractItemView, QDialogButtonBox, QFrame, QGridLayout,
|
34
34
|
QHBoxLayout, QLabel, QLineEdit, QMenu, QPlainTextEdit, QPushButton,
|
35
35
|
QSplitter, QStackedWidget, QTreeWidget, QTreeWidgetItem, QVBoxLayout,
|
@@ -37,11 +37,11 @@ from PyQt5.QtWidgets import (
|
|
37
37
|
)
|
38
38
|
|
39
39
|
from novelwriter import CONFIG, SHARED
|
40
|
-
from novelwriter.common import describeFont, fontMatcher, qtLambda
|
40
|
+
from novelwriter.common import describeFont, fontMatcher, qtAddAction, qtLambda
|
41
41
|
from novelwriter.constants import nwHeadFmt, nwKeyWords, nwLabels, trConst
|
42
42
|
from novelwriter.core.buildsettings import BuildSettings, FilterMode
|
43
43
|
from novelwriter.extensions.configlayout import (
|
44
|
-
|
44
|
+
NColorLabel, NFixedPage, NScrollableForm, NScrollablePage
|
45
45
|
)
|
46
46
|
from novelwriter.extensions.modified import (
|
47
47
|
NComboBox, NDoubleSpinBox, NIconToolButton, NSpinBox, NToolDialog
|
@@ -55,7 +55,7 @@ from novelwriter.types import (
|
|
55
55
|
QtUserRole
|
56
56
|
)
|
57
57
|
|
58
|
-
if TYPE_CHECKING:
|
58
|
+
if TYPE_CHECKING:
|
59
59
|
from novelwriter.guimain import GuiMain
|
60
60
|
|
61
61
|
logger = logging.getLogger(__name__)
|
@@ -83,21 +83,18 @@ class GuiBuildSettings(NToolDialog):
|
|
83
83
|
self._build = build
|
84
84
|
|
85
85
|
self.setWindowTitle(self.tr("Manuscript Build Settings"))
|
86
|
-
self.setMinimumSize(
|
87
|
-
|
88
|
-
wWin = CONFIG.pxInt(750)
|
89
|
-
hWin = CONFIG.pxInt(550)
|
86
|
+
self.setMinimumSize(700, 400)
|
90
87
|
|
91
88
|
options = SHARED.project.options
|
92
89
|
self.resize(
|
93
|
-
|
94
|
-
|
90
|
+
options.getInt("GuiBuildSettings", "winWidth", 750),
|
91
|
+
options.getInt("GuiBuildSettings", "winHeight", 550),
|
95
92
|
)
|
96
93
|
|
97
94
|
# Title
|
98
|
-
self.titleLabel =
|
95
|
+
self.titleLabel = NColorLabel(
|
99
96
|
self.tr("Manuscript Build Settings"), self, color=SHARED.theme.helpText,
|
100
|
-
scale=
|
97
|
+
scale=NColorLabel.HEADER_SCALE, indent=4,
|
101
98
|
)
|
102
99
|
|
103
100
|
# Settings Name
|
@@ -107,6 +104,7 @@ class GuiBuildSettings(NToolDialog):
|
|
107
104
|
# SideBar
|
108
105
|
self.sidebar = NPagedSideBar(self)
|
109
106
|
self.sidebar.setLabelColor(SHARED.theme.helpText)
|
107
|
+
self.sidebar.setAccessibleName(self.titleLabel.text())
|
110
108
|
|
111
109
|
self.sidebar.addLabel(self.tr("General"))
|
112
110
|
self.sidebar.addButton(self.tr("Selection"), self.OPT_FILTERS)
|
@@ -145,7 +143,7 @@ class GuiBuildSettings(NToolDialog):
|
|
145
143
|
self.outerBox.addLayout(self.topBox)
|
146
144
|
self.outerBox.addLayout(self.mainBox)
|
147
145
|
self.outerBox.addWidget(self.buttonBox)
|
148
|
-
self.outerBox.setSpacing(
|
146
|
+
self.outerBox.setSpacing(12)
|
149
147
|
|
150
148
|
self.setLayout(self.outerBox)
|
151
149
|
|
@@ -231,8 +229,8 @@ class GuiBuildSettings(NToolDialog):
|
|
231
229
|
"""
|
232
230
|
if self._build.changed:
|
233
231
|
response = SHARED.question(self.tr(
|
234
|
-
"Do you want to save your changes to '{0}'?"
|
235
|
-
))
|
232
|
+
"Do you want to save your changes to '{0}'?"
|
233
|
+
).format(self._build.name))
|
236
234
|
if response:
|
237
235
|
self._emitBuildData()
|
238
236
|
self._build.resetChangedState()
|
@@ -240,14 +238,11 @@ class GuiBuildSettings(NToolDialog):
|
|
240
238
|
|
241
239
|
def _saveSettings(self) -> None:
|
242
240
|
"""Save the various user settings."""
|
243
|
-
winWidth = CONFIG.rpxInt(self.width())
|
244
|
-
winHeight = CONFIG.rpxInt(self.height())
|
245
241
|
treeWidth, filterWidth = self.optTabSelect.mainSplitSizes()
|
246
|
-
|
247
242
|
logger.debug("Saving State: GuiBuildSettings")
|
248
243
|
pOptions = SHARED.project.options
|
249
|
-
pOptions.setValue("GuiBuildSettings", "winWidth",
|
250
|
-
pOptions.setValue("GuiBuildSettings", "winHeight",
|
244
|
+
pOptions.setValue("GuiBuildSettings", "winWidth", self.width())
|
245
|
+
pOptions.setValue("GuiBuildSettings", "winHeight", self.height())
|
251
246
|
pOptions.setValue("GuiBuildSettings", "treeWidth", treeWidth)
|
252
247
|
pOptions.setValue("GuiBuildSettings", "filterWidth", filterWidth)
|
253
248
|
pOptions.saveSettings()
|
@@ -287,9 +282,9 @@ class _FilterTab(NFixedPage):
|
|
287
282
|
|
288
283
|
self._statusFlags: dict[int, QIcon] = {
|
289
284
|
self.F_NONE: QIcon(),
|
290
|
-
self.F_FILTERED: SHARED.theme.getIcon("
|
291
|
-
self.F_INCLUDED: SHARED.theme.getIcon("
|
292
|
-
self.F_EXCLUDED: SHARED.theme.getIcon("
|
285
|
+
self.F_FILTERED: SHARED.theme.getIcon("filter", "orange"),
|
286
|
+
self.F_INCLUDED: SHARED.theme.getIcon("pin", "blue"),
|
287
|
+
self.F_EXCLUDED: SHARED.theme.getIcon("exclude", "red"),
|
293
288
|
}
|
294
289
|
|
295
290
|
self._trIncluded = self.tr("Included in manuscript")
|
@@ -300,7 +295,6 @@ class _FilterTab(NFixedPage):
|
|
300
295
|
|
301
296
|
iSz = SHARED.theme.baseIconSize
|
302
297
|
iPx = SHARED.theme.baseIconHeight
|
303
|
-
cMg = CONFIG.pxInt(6)
|
304
298
|
|
305
299
|
# Tree Widget
|
306
300
|
self.optTree = QTreeWidget(self)
|
@@ -311,14 +305,14 @@ class _FilterTab(NFixedPage):
|
|
311
305
|
self.optTree.setIndentation(iPx)
|
312
306
|
self.optTree.setColumnCount(3)
|
313
307
|
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
308
|
+
if header := self.optTree.header():
|
309
|
+
header.setStretchLastSection(False)
|
310
|
+
header.setMinimumSectionSize(iPx + 6) # See Issue #1551
|
311
|
+
header.setSectionResizeMode(self.C_NAME, QtHeaderStretch)
|
312
|
+
header.setSectionResizeMode(self.C_ACTIVE, QtHeaderFixed)
|
313
|
+
header.setSectionResizeMode(self.C_STATUS, QtHeaderFixed)
|
314
|
+
header.resizeSection(self.C_ACTIVE, iPx + 6)
|
315
|
+
header.resizeSection(self.C_STATUS, iPx + 6)
|
322
316
|
|
323
317
|
self.optTree.setDragDropMode(QAbstractItemView.DragDropMode.NoDragDrop)
|
324
318
|
self.optTree.setSelectionMode(QAbstractItemView.SelectionMode.ExtendedSelection)
|
@@ -337,7 +331,7 @@ class _FilterTab(NFixedPage):
|
|
337
331
|
self.excludedButton.setIcon(self._statusFlags[self.F_EXCLUDED])
|
338
332
|
self.excludedButton.clicked.connect(qtLambda(self._setSelectedMode, self.F_EXCLUDED))
|
339
333
|
|
340
|
-
self.resetButton = NIconToolButton(self, iSz, "revert")
|
334
|
+
self.resetButton = NIconToolButton(self, iSz, "revert", "green")
|
341
335
|
self.resetButton.setToolTip(self.tr("Reset to default"))
|
342
336
|
self.resetButton.clicked.connect(qtLambda(self._setSelectedMode, self.F_FILTERED))
|
343
337
|
|
@@ -347,7 +341,7 @@ class _FilterTab(NFixedPage):
|
|
347
341
|
self.modeBox.addWidget(self.includedButton)
|
348
342
|
self.modeBox.addWidget(self.excludedButton)
|
349
343
|
self.modeBox.addWidget(self.resetButton)
|
350
|
-
self.modeBox.setSpacing(
|
344
|
+
self.modeBox.setSpacing(4)
|
351
345
|
|
352
346
|
# Filer Options
|
353
347
|
self.filterOpt = NSwitchBox(self, iPx)
|
@@ -375,8 +369,8 @@ class _FilterTab(NFixedPage):
|
|
375
369
|
self.mainSplit.setStretchFactor(0, 1)
|
376
370
|
self.mainSplit.setStretchFactor(1, 0)
|
377
371
|
self.mainSplit.setSizes([
|
378
|
-
|
379
|
-
|
372
|
+
pOptions.getInt("GuiBuildSettings", "treeWidth", 300),
|
373
|
+
pOptions.getInt("GuiBuildSettings", "filterWidth", 300),
|
380
374
|
])
|
381
375
|
|
382
376
|
self.setCentralWidget(self.mainSplit)
|
@@ -393,7 +387,7 @@ class _FilterTab(NFixedPage):
|
|
393
387
|
"""Extract the sizes of the main splitter."""
|
394
388
|
sizes = self.mainSplit.sizes()
|
395
389
|
m, n = (sizes[0], sizes[1]) if len(sizes) >= 2 else (0, 0)
|
396
|
-
return
|
390
|
+
return m, n
|
397
391
|
|
398
392
|
##
|
399
393
|
# Slots
|
@@ -459,19 +453,19 @@ class _FilterTab(NFixedPage):
|
|
459
453
|
self.filterOpt.clear()
|
460
454
|
self.filterOpt.addLabel(self._build.getLabel("filter"))
|
461
455
|
self.filterOpt.addItem(
|
462
|
-
SHARED.theme.getIcon("
|
456
|
+
SHARED.theme.getIcon("prj_scene", "scene"),
|
463
457
|
self._build.getLabel("filter.includeNovel"),
|
464
458
|
"doc:filter.includeNovel",
|
465
459
|
default=self._build.getBool("filter.includeNovel")
|
466
460
|
)
|
467
461
|
self.filterOpt.addItem(
|
468
|
-
SHARED.theme.getIcon("
|
462
|
+
SHARED.theme.getIcon("prj_note", "note"),
|
469
463
|
self._build.getLabel("filter.includeNotes"),
|
470
464
|
"doc:filter.includeNotes",
|
471
465
|
default=self._build.getBool("filter.includeNotes")
|
472
466
|
)
|
473
467
|
self.filterOpt.addItem(
|
474
|
-
SHARED.theme.getIcon("unchecked"),
|
468
|
+
SHARED.theme.getIcon("unchecked", "red"),
|
475
469
|
self._build.getLabel("filter.includeInactive"),
|
476
470
|
"doc:filter.includeInactive",
|
477
471
|
default=self._build.getBool("filter.includeInactive")
|
@@ -558,25 +552,23 @@ class _HeadingsTab(NScrollablePage):
|
|
558
552
|
|
559
553
|
iPx = SHARED.theme.baseIconHeight
|
560
554
|
iSz = SHARED.theme.baseIconSize
|
561
|
-
sSp = CONFIG.pxInt(16)
|
562
|
-
vSp = CONFIG.pxInt(12)
|
563
|
-
bSp = CONFIG.pxInt(6)
|
564
555
|
trHide = self.tr("Hide")
|
565
556
|
|
566
557
|
# Format Boxes
|
567
558
|
# ============
|
568
559
|
self.formatBox = QGridLayout()
|
569
|
-
self.formatBox.setHorizontalSpacing(
|
560
|
+
self.formatBox.setHorizontalSpacing(6)
|
570
561
|
|
571
562
|
# Title Heading
|
572
563
|
self.lblPart = QLabel(self._build.getLabel("headings.fmtPart"), self)
|
573
564
|
self.fmtPart = QLineEdit("", self)
|
574
565
|
self.fmtPart.setReadOnly(True)
|
575
|
-
self.btnPart = NIconToolButton(self, iSz, "edit")
|
566
|
+
self.btnPart = NIconToolButton(self, iSz, "edit", "green")
|
576
567
|
self.btnPart.clicked.connect(qtLambda(self._editHeading, self.EDIT_TITLE))
|
577
|
-
self.hdePart = QLabel(trHide, self)
|
578
|
-
self.hdePart.setIndent(bSp)
|
579
568
|
self.swtPart = NSwitch(self, height=iPx)
|
569
|
+
self.hdePart = QLabel(trHide, self)
|
570
|
+
self.hdePart.setIndent(6)
|
571
|
+
self.hdePart.setBuddy(self.swtPart)
|
580
572
|
|
581
573
|
self.formatBox.addWidget(self.lblPart, 0, 0)
|
582
574
|
self.formatBox.addWidget(self.fmtPart, 0, 1)
|
@@ -588,11 +580,12 @@ class _HeadingsTab(NScrollablePage):
|
|
588
580
|
self.lblChapter = QLabel(self._build.getLabel("headings.fmtChapter"), self)
|
589
581
|
self.fmtChapter = QLineEdit("", self)
|
590
582
|
self.fmtChapter.setReadOnly(True)
|
591
|
-
self.btnChapter = NIconToolButton(self, iSz, "edit")
|
583
|
+
self.btnChapter = NIconToolButton(self, iSz, "edit", "green")
|
592
584
|
self.btnChapter.clicked.connect(qtLambda(self._editHeading, self.EDIT_CHAPTER))
|
593
|
-
self.hdeChapter = QLabel(trHide, self)
|
594
|
-
self.hdeChapter.setIndent(bSp)
|
595
585
|
self.swtChapter = NSwitch(self, height=iPx)
|
586
|
+
self.hdeChapter = QLabel(trHide, self)
|
587
|
+
self.hdeChapter.setIndent(6)
|
588
|
+
self.hdeChapter.setBuddy(self.swtChapter)
|
596
589
|
|
597
590
|
self.formatBox.addWidget(self.lblChapter, 1, 0)
|
598
591
|
self.formatBox.addWidget(self.fmtChapter, 1, 1)
|
@@ -604,11 +597,12 @@ class _HeadingsTab(NScrollablePage):
|
|
604
597
|
self.lblUnnumbered = QLabel(self._build.getLabel("headings.fmtUnnumbered"), self)
|
605
598
|
self.fmtUnnumbered = QLineEdit("", self)
|
606
599
|
self.fmtUnnumbered.setReadOnly(True)
|
607
|
-
self.btnUnnumbered = NIconToolButton(self, iSz, "edit")
|
600
|
+
self.btnUnnumbered = NIconToolButton(self, iSz, "edit", "green")
|
608
601
|
self.btnUnnumbered.clicked.connect(qtLambda(self._editHeading, self.EDIT_UNNUM))
|
609
|
-
self.hdeUnnumbered = QLabel(trHide, self)
|
610
|
-
self.hdeUnnumbered.setIndent(bSp)
|
611
602
|
self.swtUnnumbered = NSwitch(self, height=iPx)
|
603
|
+
self.hdeUnnumbered = QLabel(trHide, self)
|
604
|
+
self.hdeUnnumbered.setIndent(6)
|
605
|
+
self.hdeUnnumbered.setBuddy(self.swtUnnumbered)
|
612
606
|
|
613
607
|
self.formatBox.addWidget(self.lblUnnumbered, 2, 0)
|
614
608
|
self.formatBox.addWidget(self.fmtUnnumbered, 2, 1)
|
@@ -620,11 +614,12 @@ class _HeadingsTab(NScrollablePage):
|
|
620
614
|
self.lblScene = QLabel(self._build.getLabel("headings.fmtScene"), self)
|
621
615
|
self.fmtScene = QLineEdit("", self)
|
622
616
|
self.fmtScene.setReadOnly(True)
|
623
|
-
self.btnScene = NIconToolButton(self, iSz, "edit")
|
617
|
+
self.btnScene = NIconToolButton(self, iSz, "edit", "green")
|
624
618
|
self.btnScene.clicked.connect(qtLambda(self._editHeading, self.EDIT_SCENE))
|
625
|
-
self.hdeScene = QLabel(trHide, self)
|
626
|
-
self.hdeScene.setIndent(bSp)
|
627
619
|
self.swtScene = NSwitch(self, height=iPx)
|
620
|
+
self.hdeScene = QLabel(trHide, self)
|
621
|
+
self.hdeScene.setIndent(6)
|
622
|
+
self.hdeScene.setBuddy(self.swtScene)
|
628
623
|
|
629
624
|
self.formatBox.addWidget(self.lblScene, 3, 0)
|
630
625
|
self.formatBox.addWidget(self.fmtScene, 3, 1)
|
@@ -636,11 +631,12 @@ class _HeadingsTab(NScrollablePage):
|
|
636
631
|
self.lblAScene = QLabel(self._build.getLabel("headings.fmtAltScene"), self)
|
637
632
|
self.fmtAScene = QLineEdit("", self)
|
638
633
|
self.fmtAScene.setReadOnly(True)
|
639
|
-
self.btnAScene = NIconToolButton(self, iSz, "edit")
|
634
|
+
self.btnAScene = NIconToolButton(self, iSz, "edit", "green")
|
640
635
|
self.btnAScene.clicked.connect(qtLambda(self._editHeading, self.EDIT_HSCENE))
|
641
|
-
self.hdeAScene = QLabel(trHide, self)
|
642
|
-
self.hdeAScene.setIndent(bSp)
|
643
636
|
self.swtAScene = NSwitch(self, height=iPx)
|
637
|
+
self.hdeAScene = QLabel(trHide, self)
|
638
|
+
self.hdeAScene.setIndent(6)
|
639
|
+
self.hdeAScene.setBuddy(self.swtAScene)
|
644
640
|
|
645
641
|
self.formatBox.addWidget(self.lblAScene, 4, 0)
|
646
642
|
self.formatBox.addWidget(self.fmtAScene, 4, 1)
|
@@ -652,11 +648,12 @@ class _HeadingsTab(NScrollablePage):
|
|
652
648
|
self.lblSection = QLabel(self._build.getLabel("headings.fmtSection"), self)
|
653
649
|
self.fmtSection = QLineEdit("", self)
|
654
650
|
self.fmtSection.setReadOnly(True)
|
655
|
-
self.btnSection = NIconToolButton(self, iSz, "edit")
|
651
|
+
self.btnSection = NIconToolButton(self, iSz, "edit", "green")
|
656
652
|
self.btnSection.clicked.connect(qtLambda(self._editHeading, self.EDIT_SECTION))
|
657
|
-
self.hdeSection = QLabel(trHide, self)
|
658
|
-
self.hdeSection.setIndent(bSp)
|
659
653
|
self.swtSection = NSwitch(self, height=iPx)
|
654
|
+
self.hdeSection = QLabel(trHide, self)
|
655
|
+
self.hdeSection.setIndent(6)
|
656
|
+
self.hdeSection.setBuddy(self.swtSection)
|
660
657
|
|
661
658
|
self.formatBox.addWidget(self.lblSection, 5, 0)
|
662
659
|
self.formatBox.addWidget(self.fmtSection, 5, 1)
|
@@ -675,16 +672,16 @@ class _HeadingsTab(NScrollablePage):
|
|
675
672
|
|
676
673
|
self.formSyntax = _HeadingSyntaxHighlighter(self.editTextBox.document())
|
677
674
|
|
678
|
-
self.
|
679
|
-
self.aInsTitle = self.
|
680
|
-
self.aInsChNum = self.
|
681
|
-
self.aInsChWord = self.
|
682
|
-
self.aInsChRomU = self.
|
683
|
-
self.aInsChRomL = self.
|
684
|
-
self.aInsScNum = self.
|
685
|
-
self.aInsScAbs = self.
|
686
|
-
self.aInsCharPOV = self.
|
687
|
-
self.aInsCharFocus = self.
|
675
|
+
self.mInsert = QMenu(self)
|
676
|
+
self.aInsTitle = qtAddAction(self.mInsert, self.tr("Title"))
|
677
|
+
self.aInsChNum = qtAddAction(self.mInsert, self.tr("Chapter Number"))
|
678
|
+
self.aInsChWord = qtAddAction(self.mInsert, self.tr("Chapter Number (Word)"))
|
679
|
+
self.aInsChRomU = qtAddAction(self.mInsert, self.tr("Chapter Number (Upper Case Roman)"))
|
680
|
+
self.aInsChRomL = qtAddAction(self.mInsert, self.tr("Chapter Number (Lower Case Roman)"))
|
681
|
+
self.aInsScNum = qtAddAction(self.mInsert, self.tr("Scene Number (In Chapter)"))
|
682
|
+
self.aInsScAbs = qtAddAction(self.mInsert, self.tr("Scene Number (Absolute)"))
|
683
|
+
self.aInsCharPOV = qtAddAction(self.mInsert, self.tr("Point of View Character"))
|
684
|
+
self.aInsCharFocus = qtAddAction(self.mInsert, self.tr("Focus Character"))
|
688
685
|
|
689
686
|
self.aInsTitle.triggered.connect(qtLambda(self._insertIntoForm, nwHeadFmt.TITLE))
|
690
687
|
self.aInsChNum.triggered.connect(qtLambda(self._insertIntoForm, nwHeadFmt.CH_NUM))
|
@@ -697,7 +694,7 @@ class _HeadingsTab(NScrollablePage):
|
|
697
694
|
self.aInsCharFocus.triggered.connect(qtLambda(self._insertIntoForm, nwHeadFmt.CHAR_FOCUS))
|
698
695
|
|
699
696
|
self.btnInsert = QPushButton(self.tr("Insert"), self)
|
700
|
-
self.btnInsert.setMenu(self.
|
697
|
+
self.btnInsert.setMenu(self.mInsert)
|
701
698
|
|
702
699
|
self.btnApply = QPushButton(self.tr("Apply"), self)
|
703
700
|
self.btnApply.clicked.connect(self._saveFormat)
|
@@ -714,44 +711,59 @@ class _HeadingsTab(NScrollablePage):
|
|
714
711
|
|
715
712
|
# Layout Matrix
|
716
713
|
# =============
|
714
|
+
trCentre = self.tr("Centre")
|
715
|
+
trBreak = self.tr("Page Break")
|
716
|
+
|
717
717
|
self.layoutMatrix = QGridLayout()
|
718
|
-
self.layoutMatrix.setVerticalSpacing(
|
719
|
-
self.layoutMatrix.setHorizontalSpacing(
|
718
|
+
self.layoutMatrix.setVerticalSpacing(12)
|
719
|
+
self.layoutMatrix.setHorizontalSpacing(12)
|
720
720
|
|
721
|
-
self.layoutMatrix.addWidget(QLabel(
|
722
|
-
self.layoutMatrix.addWidget(QLabel(
|
721
|
+
self.layoutMatrix.addWidget(QLabel(trCentre, self), 0, 1)
|
722
|
+
self.layoutMatrix.addWidget(QLabel(trBreak, self), 0, 2)
|
723
723
|
|
724
724
|
# Title Layout
|
725
|
-
|
725
|
+
trLabel = self._build.getLabel("headings.styleTitle")
|
726
|
+
self.lblTitle = QLabel(trLabel, self)
|
726
727
|
self.centerTitle = NSwitch(self, height=iPx)
|
728
|
+
self.centerTitle.setAccessibleName(f"{trLabel}: {trCentre}")
|
727
729
|
self.breakTitle = NSwitch(self, height=iPx)
|
730
|
+
self.breakTitle.setAccessibleName(f"{trLabel}: {trBreak}")
|
728
731
|
|
729
732
|
self.layoutMatrix.addWidget(self.lblTitle, 1, 0)
|
730
733
|
self.layoutMatrix.addWidget(self.centerTitle, 1, 1, QtAlignCenter)
|
731
734
|
self.layoutMatrix.addWidget(self.breakTitle, 1, 2, QtAlignCenter)
|
732
735
|
|
733
736
|
# Partition Layout
|
734
|
-
|
737
|
+
trLabel = self._build.getLabel("headings.stylePart")
|
738
|
+
self.lblPart = QLabel(trLabel, self)
|
735
739
|
self.centerPart = NSwitch(self, height=iPx)
|
740
|
+
self.centerPart.setAccessibleName(f"{trLabel}: {trCentre}")
|
736
741
|
self.breakPart = NSwitch(self, height=iPx)
|
742
|
+
self.breakPart.setAccessibleName(f"{trLabel}: {trBreak}")
|
737
743
|
|
738
744
|
self.layoutMatrix.addWidget(self.lblPart, 2, 0)
|
739
745
|
self.layoutMatrix.addWidget(self.centerPart, 2, 1, QtAlignCenter)
|
740
746
|
self.layoutMatrix.addWidget(self.breakPart, 2, 2, QtAlignCenter)
|
741
747
|
|
742
748
|
# Chapter Layout
|
743
|
-
|
749
|
+
trLabel = self._build.getLabel("headings.styleChapter")
|
750
|
+
self.lblChapter = QLabel(trLabel, self)
|
744
751
|
self.centerChapter = NSwitch(self, height=iPx)
|
752
|
+
self.centerChapter.setAccessibleName(f"{trLabel}: {trCentre}")
|
745
753
|
self.breakChapter = NSwitch(self, height=iPx)
|
754
|
+
self.breakChapter.setAccessibleName(f"{trLabel}: {trBreak}")
|
746
755
|
|
747
756
|
self.layoutMatrix.addWidget(self.lblChapter, 3, 0)
|
748
757
|
self.layoutMatrix.addWidget(self.centerChapter, 3, 1, QtAlignCenter)
|
749
758
|
self.layoutMatrix.addWidget(self.breakChapter, 3, 2, QtAlignCenter)
|
750
759
|
|
751
760
|
# Scene Layout
|
752
|
-
|
761
|
+
trLabel = self._build.getLabel("headings.styleScene")
|
762
|
+
self.lblScene = QLabel(trLabel, self)
|
753
763
|
self.centerScene = NSwitch(self, height=iPx)
|
764
|
+
self.centerScene.setAccessibleName(f"{trLabel}: {trCentre}")
|
754
765
|
self.breakScene = NSwitch(self, height=iPx)
|
766
|
+
self.breakScene.setAccessibleName(f"{trLabel}: {trBreak}")
|
755
767
|
|
756
768
|
self.layoutMatrix.addWidget(self.lblScene, 4, 0)
|
757
769
|
self.layoutMatrix.addWidget(self.centerScene, 4, 1, QtAlignCenter)
|
@@ -764,9 +776,9 @@ class _HeadingsTab(NScrollablePage):
|
|
764
776
|
|
765
777
|
self.outerBox = QVBoxLayout()
|
766
778
|
self.outerBox.addLayout(self.formatBox)
|
767
|
-
self.outerBox.addSpacing(
|
779
|
+
self.outerBox.addSpacing(16)
|
768
780
|
self.outerBox.addLayout(self.editFormBox)
|
769
|
-
self.outerBox.addSpacing(
|
781
|
+
self.outerBox.addSpacing(16)
|
770
782
|
self.outerBox.addLayout(self.layoutMatrix)
|
771
783
|
self.outerBox.addStretch(1)
|
772
784
|
|
@@ -904,12 +916,13 @@ class _HeadingsTab(NScrollablePage):
|
|
904
916
|
|
905
917
|
class _HeadingSyntaxHighlighter(QSyntaxHighlighter):
|
906
918
|
|
907
|
-
def __init__(self, document: QTextDocument) -> None:
|
919
|
+
def __init__(self, document: QTextDocument | None) -> None:
|
908
920
|
super().__init__(document)
|
921
|
+
syntax = SHARED.theme.syntaxTheme
|
909
922
|
self._fmtSymbol = QTextCharFormat()
|
910
|
-
self._fmtSymbol.setForeground(
|
923
|
+
self._fmtSymbol.setForeground(syntax.head)
|
911
924
|
self._fmtFormat = QTextCharFormat()
|
912
|
-
self._fmtFormat.setForeground(
|
925
|
+
self._fmtFormat.setForeground(syntax.emph)
|
913
926
|
return
|
914
927
|
|
915
928
|
def highlightBlock(self, text: str) -> None:
|
@@ -960,11 +973,15 @@ class _FormattingTab(NScrollableForm):
|
|
960
973
|
self.incBodyText = NSwitch(self, height=iPx)
|
961
974
|
self.incSynopsis = NSwitch(self, height=iPx)
|
962
975
|
self.incComments = NSwitch(self, height=iPx)
|
976
|
+
self.incStory = NSwitch(self, height=iPx)
|
977
|
+
self.incNotes = NSwitch(self, height=iPx)
|
963
978
|
self.incKeywords = NSwitch(self, height=iPx)
|
964
979
|
|
965
980
|
self.addRow(self._build.getLabel("text.includeBodyText"), self.incBodyText)
|
966
981
|
self.addRow(self._build.getLabel("text.includeSynopsis"), self.incSynopsis)
|
967
982
|
self.addRow(self._build.getLabel("text.includeComments"), self.incComments)
|
983
|
+
self.addRow(self._build.getLabel("text.includeStory"), self.incStory)
|
984
|
+
self.addRow(self._build.getLabel("text.includeNotes"), self.incNotes)
|
968
985
|
self.addRow(self._build.getLabel("text.includeKeywords"), self.incKeywords)
|
969
986
|
|
970
987
|
# Ignored Keywords
|
@@ -977,7 +994,7 @@ class _FormattingTab(NScrollableForm):
|
|
977
994
|
lambda keyword=keyword: self._updateIgnoredKeywords(keyword)
|
978
995
|
)
|
979
996
|
|
980
|
-
self.ignoredKeywordsButton = NIconToolButton(self, iSz, "add")
|
997
|
+
self.ignoredKeywordsButton = NIconToolButton(self, iSz, "add", "green")
|
981
998
|
self.ignoredKeywordsButton.setMenu(self.mnKeywords)
|
982
999
|
self.addRow(
|
983
1000
|
self._build.getLabel("text.ignoredKeywords"), self.ignoredKeywords,
|
@@ -986,7 +1003,6 @@ class _FormattingTab(NScrollableForm):
|
|
986
1003
|
|
987
1004
|
# Note Headings
|
988
1005
|
self.addNoteHead = NSwitch(self, height=iPx)
|
989
|
-
|
990
1006
|
self.addRow(self._build.getLabel("text.addNoteHeadings"), self.addNoteHead)
|
991
1007
|
|
992
1008
|
# Text Format
|
@@ -1063,8 +1079,8 @@ class _FormattingTab(NScrollableForm):
|
|
1063
1079
|
pixB = SHARED.theme.getPixmap("margin_bottom", (iPx, iPx))
|
1064
1080
|
pixL = SHARED.theme.getPixmap("margin_left", (iPx, iPx))
|
1065
1081
|
pixR = SHARED.theme.getPixmap("margin_right", (iPx, iPx))
|
1066
|
-
pixH = SHARED.theme.getPixmap("
|
1067
|
-
pixW = SHARED.theme.getPixmap("
|
1082
|
+
pixH = SHARED.theme.getPixmap("fit_height", (iPx, iPx))
|
1083
|
+
pixW = SHARED.theme.getPixmap("fit_width", (iPx, iPx))
|
1068
1084
|
|
1069
1085
|
# Title
|
1070
1086
|
self.titleMarginT = NDoubleSpinBox(self)
|
@@ -1177,11 +1193,11 @@ class _FormattingTab(NScrollableForm):
|
|
1177
1193
|
for key, name in nwLabels.PAPER_NAME.items():
|
1178
1194
|
self.pageSize.addItem(trConst(name), key)
|
1179
1195
|
|
1180
|
-
self.pageWidth = NDoubleSpinBox(self,
|
1196
|
+
self.pageWidth = NDoubleSpinBox(self, maxVal=500.0)
|
1181
1197
|
self.pageWidth.setFixedWidth(dbW)
|
1182
1198
|
self.pageWidth.valueChanged.connect(self._pageSizeValueChanged)
|
1183
1199
|
|
1184
|
-
self.pageHeight = NDoubleSpinBox(self,
|
1200
|
+
self.pageHeight = NDoubleSpinBox(self, maxVal=500.0)
|
1185
1201
|
self.pageHeight.setFixedWidth(dbW)
|
1186
1202
|
self.pageHeight.valueChanged.connect(self._pageSizeValueChanged)
|
1187
1203
|
|
@@ -1222,8 +1238,8 @@ class _FormattingTab(NScrollableForm):
|
|
1222
1238
|
|
1223
1239
|
# Header
|
1224
1240
|
self.odtPageHeader = QLineEdit(self)
|
1225
|
-
self.odtPageHeader.setMinimumWidth(
|
1226
|
-
self.btnPageHeader = NIconToolButton(self, iSz, "revert")
|
1241
|
+
self.odtPageHeader.setMinimumWidth(200)
|
1242
|
+
self.btnPageHeader = NIconToolButton(self, iSz, "revert", "green")
|
1227
1243
|
self.btnPageHeader.clicked.connect(self._resetPageHeader)
|
1228
1244
|
self.addRow(
|
1229
1245
|
self._build.getLabel("doc.pageHeader"), self.odtPageHeader,
|
@@ -1273,6 +1289,8 @@ class _FormattingTab(NScrollableForm):
|
|
1273
1289
|
self.incBodyText.setChecked(self._build.getBool("text.includeBodyText"))
|
1274
1290
|
self.incSynopsis.setChecked(self._build.getBool("text.includeSynopsis"))
|
1275
1291
|
self.incComments.setChecked(self._build.getBool("text.includeComments"))
|
1292
|
+
self.incStory.setChecked(self._build.getBool("text.includeStory"))
|
1293
|
+
self.incNotes.setChecked(self._build.getBool("text.includeNotes"))
|
1276
1294
|
self.incKeywords.setChecked(self._build.getBool("text.includeKeywords"))
|
1277
1295
|
self.ignoredKeywords.setText(self._build.getStr("text.ignoredKeywords"))
|
1278
1296
|
self.addNoteHead.setChecked(self._build.getBool("text.addNoteHeadings"))
|
@@ -1371,6 +1389,8 @@ class _FormattingTab(NScrollableForm):
|
|
1371
1389
|
self._build.setValue("text.includeBodyText", self.incBodyText.isChecked())
|
1372
1390
|
self._build.setValue("text.includeSynopsis", self.incSynopsis.isChecked())
|
1373
1391
|
self._build.setValue("text.includeComments", self.incComments.isChecked())
|
1392
|
+
self._build.setValue("text.includeStory", self.incStory.isChecked())
|
1393
|
+
self._build.setValue("text.includeNotes", self.incNotes.isChecked())
|
1374
1394
|
self._build.setValue("text.includeKeywords", self.incKeywords.isChecked())
|
1375
1395
|
self._build.setValue("text.ignoredKeywords", self.ignoredKeywords.text())
|
1376
1396
|
self._build.setValue("text.addNoteHeadings", self.addNoteHead.isChecked())
|