novelWriter 2.6.3__py3-none-any.whl → 2.7b1__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 +84 -74
- novelwriter/assets/i18n/project_en_GB.json +1 -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 +108 -0
- novelwriter/assets/icons/remix_outline.icons +108 -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/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/solarized_dark.conf +24 -8
- novelwriter/assets/themes/solarized_light.conf +22 -6
- novelwriter/common.py +33 -26
- novelwriter/config.py +118 -127
- novelwriter/constants.py +50 -36
- novelwriter/core/buildsettings.py +23 -16
- novelwriter/core/coretools.py +11 -7
- novelwriter/core/docbuild.py +19 -13
- novelwriter/core/document.py +2 -2
- novelwriter/core/index.py +142 -432
- novelwriter/core/indexdata.py +403 -0
- novelwriter/core/item.py +35 -28
- novelwriter/core/itemmodel.py +27 -26
- novelwriter/core/novelmodel.py +223 -0
- novelwriter/core/options.py +1 -1
- novelwriter/core/project.py +10 -11
- novelwriter/core/projectdata.py +5 -5
- novelwriter/core/projectxml.py +1 -1
- novelwriter/core/sessions.py +3 -2
- novelwriter/core/spellcheck.py +4 -3
- novelwriter/core/status.py +12 -15
- novelwriter/core/storage.py +1 -1
- novelwriter/core/tree.py +46 -8
- novelwriter/dialogs/about.py +19 -22
- novelwriter/dialogs/docmerge.py +21 -23
- novelwriter/dialogs/docsplit.py +20 -23
- novelwriter/dialogs/editlabel.py +9 -13
- novelwriter/dialogs/preferences.py +111 -48
- novelwriter/dialogs/projectsettings.py +48 -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 +18 -18
- 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 +19 -30
- novelwriter/extensions/switchbox.py +7 -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 +36 -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 +216 -265
- 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 +239 -405
- novelwriter/gui/outline.py +133 -72
- novelwriter/gui/projtree.py +138 -132
- novelwriter/gui/search.py +33 -31
- novelwriter/gui/sidebar.py +13 -18
- novelwriter/gui/statusbar.py +13 -15
- novelwriter/gui/theme.py +533 -430
- novelwriter/guimain.py +27 -29
- novelwriter/shared.py +32 -23
- novelwriter/text/comments.py +70 -0
- novelwriter/text/patterns.py +4 -4
- novelwriter/tools/dictionaries.py +20 -29
- novelwriter/tools/lipsum.py +16 -17
- novelwriter/tools/manusbuild.py +39 -42
- novelwriter/tools/manuscript.py +101 -114
- novelwriter/tools/manussettings.py +78 -83
- novelwriter/tools/noveldetails.py +51 -64
- novelwriter/tools/welcome.py +56 -75
- novelwriter/tools/writingstats.py +44 -57
- novelwriter/types.py +5 -7
- {novelWriter-2.6.3.dist-info → novelwriter-2.7b1.dist-info}/METADATA +6 -6
- novelwriter-2.7b1.dist-info/RECORD +159 -0
- {novelWriter-2.6.3.dist-info → novelwriter-2.7b1.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.7b1.dist-info}/entry_points.txt +0 -0
- {novelWriter-2.6.3.dist-info → novelwriter-2.7b1.dist-info/licenses}/LICENSE.md +0 -0
- {novelWriter-2.6.3.dist-info → novelwriter-2.7b1.dist-info}/top_level.txt +0 -0
@@ -26,22 +26,25 @@ from __future__ import annotations
|
|
26
26
|
import logging
|
27
27
|
|
28
28
|
from enum import Enum
|
29
|
+
from typing import TYPE_CHECKING
|
29
30
|
|
30
|
-
from
|
31
|
-
from
|
31
|
+
from PyQt6.QtCore import QModelIndex, Qt, pyqtSignal, pyqtSlot
|
32
|
+
from PyQt6.QtWidgets import (
|
32
33
|
QAbstractItemView, QFrame, QMenu, QTabWidget, QToolButton, QTreeWidget,
|
33
34
|
QTreeWidgetItem, QVBoxLayout, QWidget
|
34
35
|
)
|
35
36
|
|
36
|
-
from novelwriter import
|
37
|
-
from novelwriter.common import checkInt
|
37
|
+
from novelwriter import SHARED
|
38
|
+
from novelwriter.common import checkInt, qtAddAction
|
38
39
|
from novelwriter.constants import nwLabels, nwLists, nwStyles, trConst
|
39
|
-
from novelwriter.core.index import IndexHeading, IndexItem
|
40
40
|
from novelwriter.enum import nwChange, nwDocMode, nwItemClass
|
41
41
|
from novelwriter.extensions.modified import NIconToolButton
|
42
42
|
from novelwriter.gui.theme import STYLES_FLAT_TABS, STYLES_MIN_TOOLBUTTON
|
43
43
|
from novelwriter.types import QtDecoration, QtHeaderFixed, QtHeaderToContents, QtUserRole
|
44
44
|
|
45
|
+
if TYPE_CHECKING:
|
46
|
+
from novelwriter.core.indexdata import IndexHeading, IndexNode
|
47
|
+
|
45
48
|
logger = logging.getLogger(__name__)
|
46
49
|
|
47
50
|
|
@@ -63,7 +66,7 @@ class GuiDocViewerPanel(QWidget):
|
|
63
66
|
|
64
67
|
self.optsMenu = QMenu(self)
|
65
68
|
|
66
|
-
self.aInactive = self.optsMenu
|
69
|
+
self.aInactive = qtAddAction(self.optsMenu, self.tr("Hide Inactive Tags"))
|
67
70
|
self.aInactive.setCheckable(True)
|
68
71
|
self.aInactive.toggled.connect(self._toggleHideInactive)
|
69
72
|
|
@@ -101,14 +104,15 @@ class GuiDocViewerPanel(QWidget):
|
|
101
104
|
|
102
105
|
def updateTheme(self, updateTabs: bool = True) -> None:
|
103
106
|
"""Update theme elements."""
|
104
|
-
self.optsButton.setThemeIcon("
|
107
|
+
self.optsButton.setThemeIcon("more_vertical")
|
105
108
|
self.optsButton.setStyleSheet(SHARED.theme.getStyleSheet(STYLES_MIN_TOOLBUTTON))
|
106
109
|
self.mainTabs.setStyleSheet(SHARED.theme.getStyleSheet(STYLES_FLAT_TABS))
|
107
|
-
self.updateHandle(self._lastHandle)
|
108
110
|
if updateTabs:
|
109
111
|
self.tabBackRefs.updateTheme()
|
112
|
+
self.tabBackRefs.refreshContent(self._lastHandle)
|
110
113
|
for tab in self.kwTabs.values():
|
111
114
|
tab.updateTheme()
|
115
|
+
self._loadAllTags()
|
112
116
|
return
|
113
117
|
|
114
118
|
def openProjectTasks(self) -> None:
|
@@ -247,7 +251,6 @@ class _ViewPanelBackRefs(QTreeWidget):
|
|
247
251
|
|
248
252
|
iPx = SHARED.theme.baseIconHeight
|
249
253
|
iSz = SHARED.theme.baseIconSize
|
250
|
-
cMg = CONFIG.pxInt(6)
|
251
254
|
|
252
255
|
self.setHeaderLabels([self.tr("Document"), "", "", self.tr("First Heading")])
|
253
256
|
self.setIndentation(0)
|
@@ -256,20 +259,20 @@ class _ViewPanelBackRefs(QTreeWidget):
|
|
256
259
|
self.setFrameStyle(QFrame.Shape.NoFrame)
|
257
260
|
|
258
261
|
# Set Header Sizes
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
262
|
+
if header := self.header():
|
263
|
+
header.setStretchLastSection(True)
|
264
|
+
header.setMinimumSectionSize(iPx + 6) # See Issue #1627
|
265
|
+
header.setSectionResizeMode(self.C_DOC, QtHeaderToContents)
|
266
|
+
header.setSectionResizeMode(self.C_EDIT, QtHeaderFixed)
|
267
|
+
header.setSectionResizeMode(self.C_VIEW, QtHeaderFixed)
|
268
|
+
header.setSectionResizeMode(self.C_TITLE, QtHeaderToContents)
|
269
|
+
header.resizeSection(self.C_EDIT, iPx + 6)
|
270
|
+
header.resizeSection(self.C_VIEW, iPx + 6)
|
271
|
+
header.setSectionsMovable(False)
|
269
272
|
|
270
273
|
# Cache Icons Locally
|
271
|
-
self._editIcon = SHARED.theme.getIcon("edit")
|
272
|
-
self._viewIcon = SHARED.theme.getIcon("view")
|
274
|
+
self._editIcon = SHARED.theme.getIcon("edit", "green")
|
275
|
+
self._viewIcon = SHARED.theme.getIcon("view", "blue")
|
273
276
|
|
274
277
|
# Signals
|
275
278
|
self.clicked.connect(self._treeItemClicked)
|
@@ -279,8 +282,8 @@ class _ViewPanelBackRefs(QTreeWidget):
|
|
279
282
|
|
280
283
|
def updateTheme(self) -> None:
|
281
284
|
"""Update theme elements."""
|
282
|
-
self._editIcon = SHARED.theme.getIcon("edit")
|
283
|
-
self._viewIcon = SHARED.theme.getIcon("view")
|
285
|
+
self._editIcon = SHARED.theme.getIcon("edit", "green")
|
286
|
+
self._viewIcon = SHARED.theme.getIcon("view", "blue")
|
284
287
|
for i in range(self.topLevelItemCount()):
|
285
288
|
if item := self.topLevelItem(i):
|
286
289
|
item.setIcon(self.C_EDIT, self._editIcon)
|
@@ -384,7 +387,6 @@ class _ViewPanelKeyWords(QTreeWidget):
|
|
384
387
|
|
385
388
|
iPx = SHARED.theme.baseIconHeight
|
386
389
|
iSz = SHARED.theme.baseIconSize
|
387
|
-
cMg = CONFIG.pxInt(6)
|
388
390
|
|
389
391
|
self.setHeaderLabels([
|
390
392
|
self.tr("Tag"), "", "", self.tr("Importance"), self.tr("Document"),
|
@@ -400,19 +402,17 @@ class _ViewPanelKeyWords(QTreeWidget):
|
|
400
402
|
self.sortByColumn(self.C_NAME, Qt.SortOrder.AscendingOrder)
|
401
403
|
|
402
404
|
# Set Header Sizes
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
405
|
+
if header := self.header():
|
406
|
+
header.setStretchLastSection(True)
|
407
|
+
header.setMinimumSectionSize(iPx + 6) # See Issue #1627
|
408
|
+
header.setSectionResizeMode(self.C_EDIT, QtHeaderFixed)
|
409
|
+
header.setSectionResizeMode(self.C_VIEW, QtHeaderFixed)
|
410
|
+
header.resizeSection(self.C_EDIT, iPx + 6)
|
411
|
+
header.resizeSection(self.C_VIEW, iPx + 6)
|
412
|
+
header.setSectionsMovable(False)
|
411
413
|
|
412
414
|
# Cache Icons Locally
|
413
|
-
self.
|
414
|
-
self._editIcon = SHARED.theme.getIcon("edit")
|
415
|
-
self._viewIcon = SHARED.theme.getIcon("view")
|
415
|
+
self.updateTheme()
|
416
416
|
|
417
417
|
# Signals
|
418
418
|
self.clicked.connect(self._treeItemClicked)
|
@@ -422,13 +422,9 @@ class _ViewPanelKeyWords(QTreeWidget):
|
|
422
422
|
|
423
423
|
def updateTheme(self) -> None:
|
424
424
|
"""Update theme elements."""
|
425
|
-
self._classIcon = SHARED.theme.getIcon(nwLabels.CLASS_ICON[self._class])
|
426
|
-
self._editIcon = SHARED.theme.getIcon("edit")
|
427
|
-
self._viewIcon = SHARED.theme.getIcon("view")
|
428
|
-
for i in range(self.topLevelItemCount()):
|
429
|
-
if item := self.topLevelItem(i):
|
430
|
-
item.setIcon(self.C_EDIT, self._editIcon)
|
431
|
-
item.setIcon(self.C_VIEW, self._viewIcon)
|
425
|
+
self._classIcon = SHARED.theme.getIcon(nwLabels.CLASS_ICON[self._class], "root")
|
426
|
+
self._editIcon = SHARED.theme.getIcon("edit", "green")
|
427
|
+
self._viewIcon = SHARED.theme.getIcon("view", "blue")
|
432
428
|
return
|
433
429
|
|
434
430
|
def countEntries(self) -> int:
|
@@ -441,7 +437,7 @@ class _ViewPanelKeyWords(QTreeWidget):
|
|
441
437
|
self.clear()
|
442
438
|
return
|
443
439
|
|
444
|
-
def addUpdateEntry(self, tag: str, name: str, iItem:
|
440
|
+
def addUpdateEntry(self, tag: str, name: str, iItem: IndexNode, hItem: IndexHeading) -> None:
|
445
441
|
"""Add a new entry, or update an existing one."""
|
446
442
|
nwItem = iItem.item
|
447
443
|
impLabel, impIcon = nwItem.getImportStatus()
|
@@ -487,19 +483,19 @@ class _ViewPanelKeyWords(QTreeWidget):
|
|
487
483
|
def setColumnWidths(self, widths: list[int]) -> None:
|
488
484
|
"""Set the column widths."""
|
489
485
|
if isinstance(widths, list) and len(widths) >= 4:
|
490
|
-
self.setColumnWidth(self.C_NAME,
|
491
|
-
self.setColumnWidth(self.C_IMPORT,
|
492
|
-
self.setColumnWidth(self.C_DOC,
|
493
|
-
self.setColumnWidth(self.C_TITLE,
|
486
|
+
self.setColumnWidth(self.C_NAME, checkInt(widths[0], 100))
|
487
|
+
self.setColumnWidth(self.C_IMPORT, checkInt(widths[1], 100))
|
488
|
+
self.setColumnWidth(self.C_DOC, checkInt(widths[2], 100))
|
489
|
+
self.setColumnWidth(self.C_TITLE, checkInt(widths[3], 100))
|
494
490
|
return
|
495
491
|
|
496
492
|
def getColumnWidths(self) -> list[int]:
|
497
493
|
"""Get the widths of the user-adjustable columns."""
|
498
494
|
return [
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
495
|
+
self.columnWidth(self.C_NAME),
|
496
|
+
self.columnWidth(self.C_IMPORT),
|
497
|
+
self.columnWidth(self.C_DOC),
|
498
|
+
self.columnWidth(self.C_TITLE),
|
503
499
|
]
|
504
500
|
|
505
501
|
##
|
@@ -25,16 +25,19 @@ from __future__ import annotations
|
|
25
25
|
|
26
26
|
import logging
|
27
27
|
|
28
|
-
from collections.abc import Iterable
|
29
28
|
from time import time
|
29
|
+
from typing import TYPE_CHECKING
|
30
30
|
|
31
|
-
from
|
32
|
-
from
|
33
|
-
from
|
31
|
+
from PyQt6.QtCore import QObject, pyqtSlot
|
32
|
+
from PyQt6.QtGui import QTextBlock, QTextCursor, QTextDocument
|
33
|
+
from PyQt6.QtWidgets import QApplication, QPlainTextDocumentLayout
|
34
34
|
|
35
35
|
from novelwriter import SHARED
|
36
36
|
from novelwriter.gui.dochighlight import GuiDocHighlighter, TextBlockData
|
37
37
|
|
38
|
+
if TYPE_CHECKING:
|
39
|
+
from collections.abc import Iterable
|
40
|
+
|
38
41
|
logger = logging.getLogger(__name__)
|
39
42
|
|
40
43
|
|
@@ -137,7 +140,7 @@ class GuiTextDocument(QTextDocument):
|
|
137
140
|
if count < maxCount and block.isValid() and block.userState() & cType > 0:
|
138
141
|
count += 1
|
139
142
|
yield block
|
140
|
-
return
|
143
|
+
return
|
141
144
|
|
142
145
|
##
|
143
146
|
# Public Slots
|
novelwriter/gui/itemdetails.py
CHANGED
@@ -27,10 +27,10 @@ import logging
|
|
27
27
|
|
28
28
|
from enum import Enum
|
29
29
|
|
30
|
-
from
|
31
|
-
from
|
30
|
+
from PyQt6.QtCore import pyqtSlot
|
31
|
+
from PyQt6.QtWidgets import QGridLayout, QLabel, QWidget
|
32
32
|
|
33
|
-
from novelwriter import
|
33
|
+
from novelwriter import SHARED
|
34
34
|
from novelwriter.common import elide
|
35
35
|
from novelwriter.constants import nwLabels, nwStats, trConst, trStats
|
36
36
|
from novelwriter.enum import nwChange
|
@@ -53,9 +53,6 @@ class GuiItemDetails(QWidget):
|
|
53
53
|
self._handle = None
|
54
54
|
|
55
55
|
# Sizes
|
56
|
-
hSp = CONFIG.pxInt(6)
|
57
|
-
vSp = CONFIG.pxInt(1)
|
58
|
-
mPx = CONFIG.pxInt(6)
|
59
56
|
fPt = SHARED.theme.fontPointSize
|
60
57
|
|
61
58
|
fntLabel = self.font()
|
@@ -177,9 +174,9 @@ class GuiItemDetails(QWidget):
|
|
177
174
|
self.mainBox.setColumnStretch(3, 0)
|
178
175
|
self.mainBox.setColumnStretch(4, 0)
|
179
176
|
|
180
|
-
self.mainBox.setHorizontalSpacing(
|
181
|
-
self.mainBox.setVerticalSpacing(
|
182
|
-
self.mainBox.setContentsMargins(
|
177
|
+
self.mainBox.setHorizontalSpacing(6)
|
178
|
+
self.mainBox.setVerticalSpacing(1)
|
179
|
+
self.mainBox.setContentsMargins(6, 6, 6, 6)
|
183
180
|
|
184
181
|
self.setLayout(self.mainBox)
|
185
182
|
|
@@ -231,18 +228,18 @@ class GuiItemDetails(QWidget):
|
|
231
228
|
return
|
232
229
|
|
233
230
|
self._handle = tHandle
|
234
|
-
iPx =
|
231
|
+
iPx = round(0.9*SHARED.theme.baseIconHeight)
|
235
232
|
|
236
233
|
# Label
|
237
234
|
# =====
|
238
235
|
|
239
236
|
if nwItem.isFileType():
|
240
237
|
if nwItem.isActive:
|
241
|
-
self.labelIcon.setPixmap(SHARED.theme.getPixmap("checked", (iPx, iPx)))
|
238
|
+
self.labelIcon.setPixmap(SHARED.theme.getPixmap("checked", (iPx, iPx), "green"))
|
242
239
|
else:
|
243
|
-
self.labelIcon.setPixmap(SHARED.theme.getPixmap("unchecked", (iPx, iPx)))
|
240
|
+
self.labelIcon.setPixmap(SHARED.theme.getPixmap("unchecked", (iPx, iPx), "red"))
|
244
241
|
else:
|
245
|
-
self.labelIcon.setPixmap(SHARED.theme.getPixmap("noncheckable", (iPx, iPx)))
|
242
|
+
self.labelIcon.setPixmap(SHARED.theme.getPixmap("noncheckable", (iPx, iPx), "faded"))
|
246
243
|
|
247
244
|
self.labelData.setText(elide(nwItem.itemName, 100))
|
248
245
|
|
@@ -256,7 +253,7 @@ class GuiItemDetails(QWidget):
|
|
256
253
|
# Class
|
257
254
|
# =====
|
258
255
|
|
259
|
-
classIcon = SHARED.theme.getIcon(nwLabels.CLASS_ICON[nwItem.itemClass])
|
256
|
+
classIcon = SHARED.theme.getIcon(nwLabels.CLASS_ICON[nwItem.itemClass], "root")
|
260
257
|
self.classIcon.setPixmap(classIcon.pixmap(iPx, iPx))
|
261
258
|
self.classData.setText(trConst(nwLabels.CLASS_NAME[nwItem.itemClass]))
|
262
259
|
|