novelWriter 2.6.2__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/nw_cs_CZ.qm +0 -0
- 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_ru_RU.qm +0 -0
- novelwriter/assets/i18n/nw_zh_CN.qm +0 -0
- 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 +75 -56
- 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 +15 -18
- novelwriter/gui/mainmenu.py +147 -146
- novelwriter/gui/noveltree.py +239 -405
- novelwriter/gui/outline.py +137 -76
- 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 +113 -126
- 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.2.dist-info → novelwriter-2.7b1.dist-info}/METADATA +6 -6
- novelwriter-2.7b1.dist-info/RECORD +159 -0
- {novelWriter-2.6.2.dist-info → novelwriter-2.7b1.dist-info}/WHEEL +1 -1
- novelWriter-2.6.2.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.2.dist-info → novelwriter-2.7b1.dist-info}/entry_points.txt +0 -0
- {novelWriter-2.6.2.dist-info → novelwriter-2.7b1.dist-info/licenses}/LICENSE.md +0 -0
- {novelWriter-2.6.2.dist-info → novelwriter-2.7b1.dist-info}/top_level.txt +0 -0
novelwriter/dialogs/docmerge.py
CHANGED
@@ -26,14 +26,14 @@ from __future__ import annotations
|
|
26
26
|
|
27
27
|
import logging
|
28
28
|
|
29
|
-
from
|
30
|
-
from
|
29
|
+
from PyQt6.QtCore import Qt, pyqtSlot
|
30
|
+
from PyQt6.QtWidgets import (
|
31
31
|
QAbstractItemView, QDialogButtonBox, QGridLayout, QLabel, QListWidget,
|
32
32
|
QListWidgetItem, QVBoxLayout, QWidget
|
33
33
|
)
|
34
34
|
|
35
|
-
from novelwriter import
|
36
|
-
from novelwriter.extensions.configlayout import
|
35
|
+
from novelwriter import SHARED
|
36
|
+
from novelwriter.extensions.configlayout import NColorLabel
|
37
37
|
from novelwriter.extensions.modified import NDialog
|
38
38
|
from novelwriter.extensions.switch import NSwitch
|
39
39
|
from novelwriter.types import QtAccepted, QtDialogCancel, QtDialogOk, QtDialogReset, QtUserRole
|
@@ -56,21 +56,18 @@ class GuiDocMerge(NDialog):
|
|
56
56
|
|
57
57
|
self.headLabel = QLabel(self.tr("Documents to Merge"), self)
|
58
58
|
self.headLabel.setFont(SHARED.theme.guiFontB)
|
59
|
-
self.helpLabel =
|
59
|
+
self.helpLabel = NColorLabel(
|
60
60
|
self.tr("Drag and drop items to change the order, or uncheck to exclude."),
|
61
61
|
self, color=SHARED.theme.helpText, wrap=True
|
62
62
|
)
|
63
63
|
|
64
64
|
iPx = SHARED.theme.baseIconHeight
|
65
65
|
iSz = SHARED.theme.baseIconSize
|
66
|
-
hSp = CONFIG.pxInt(12)
|
67
|
-
vSp = CONFIG.pxInt(8)
|
68
|
-
bSp = CONFIG.pxInt(12)
|
69
66
|
|
70
67
|
self.listBox = QListWidget(self)
|
71
68
|
self.listBox.setIconSize(iSz)
|
72
|
-
self.listBox.setMinimumWidth(
|
73
|
-
self.listBox.setMinimumHeight(
|
69
|
+
self.listBox.setMinimumWidth(400)
|
70
|
+
self.listBox.setMinimumHeight(180)
|
74
71
|
self.listBox.setSelectionBehavior(QAbstractItemView.SelectionBehavior.SelectRows)
|
75
72
|
self.listBox.setSelectionMode(QAbstractItemView.SelectionMode.SingleSelection)
|
76
73
|
self.listBox.setDragDropMode(QAbstractItemView.DragDropMode.InternalMove)
|
@@ -82,7 +79,7 @@ class GuiDocMerge(NDialog):
|
|
82
79
|
self.optBox = QGridLayout()
|
83
80
|
self.optBox.addWidget(self.trashLabel, 0, 0)
|
84
81
|
self.optBox.addWidget(self.trashSwitch, 0, 1)
|
85
|
-
self.optBox.setHorizontalSpacing(
|
82
|
+
self.optBox.setHorizontalSpacing(12)
|
86
83
|
self.optBox.setColumnStretch(2, 1)
|
87
84
|
|
88
85
|
# Buttons
|
@@ -91,18 +88,19 @@ class GuiDocMerge(NDialog):
|
|
91
88
|
self.buttonBox.rejected.connect(self.reject)
|
92
89
|
|
93
90
|
self.resetButton = self.buttonBox.addButton(QtDialogReset)
|
94
|
-
self.resetButton
|
91
|
+
if self.resetButton:
|
92
|
+
self.resetButton.clicked.connect(self._resetList)
|
95
93
|
|
96
94
|
# Assemble
|
97
95
|
self.outerBox = QVBoxLayout()
|
98
96
|
self.outerBox.setSpacing(0)
|
99
97
|
self.outerBox.addWidget(self.headLabel)
|
100
98
|
self.outerBox.addWidget(self.helpLabel)
|
101
|
-
self.outerBox.addSpacing(
|
99
|
+
self.outerBox.addSpacing(8)
|
102
100
|
self.outerBox.addWidget(self.listBox)
|
103
|
-
self.outerBox.addSpacing(
|
101
|
+
self.outerBox.addSpacing(8)
|
104
102
|
self.outerBox.addLayout(self.optBox)
|
105
|
-
self.outerBox.addSpacing(
|
103
|
+
self.outerBox.addSpacing(12)
|
106
104
|
self.outerBox.addWidget(self.buttonBox)
|
107
105
|
self.setLayout(self.outerBox)
|
108
106
|
|
@@ -133,11 +131,11 @@ class GuiDocMerge(NDialog):
|
|
133
131
|
@classmethod
|
134
132
|
def getData(cls, parent: QWidget, handle: str, items: list[str]) -> tuple[dict, bool]:
|
135
133
|
"""Pop the dialog and return the result."""
|
136
|
-
|
137
|
-
|
138
|
-
data =
|
139
|
-
accepted =
|
140
|
-
|
134
|
+
dialog = cls(parent, handle, items)
|
135
|
+
dialog.exec()
|
136
|
+
data = dialog.data()
|
137
|
+
accepted = dialog.result() == QtAccepted
|
138
|
+
dialog.softDelete()
|
141
139
|
return data, accepted
|
142
140
|
|
143
141
|
##
|
@@ -148,9 +146,9 @@ class GuiDocMerge(NDialog):
|
|
148
146
|
def _resetList(self) -> None:
|
149
147
|
"""Reset the content of the list box to its original state."""
|
150
148
|
logger.debug("Resetting list box content")
|
151
|
-
sHandle
|
152
|
-
|
153
|
-
|
149
|
+
if sHandle := self._data.get("sHandle"):
|
150
|
+
itemList = self._data.get("origItems", [])
|
151
|
+
self._loadContent(sHandle, itemList)
|
154
152
|
return
|
155
153
|
|
156
154
|
##
|
novelwriter/dialogs/docsplit.py
CHANGED
@@ -26,14 +26,14 @@ from __future__ import annotations
|
|
26
26
|
|
27
27
|
import logging
|
28
28
|
|
29
|
-
from
|
30
|
-
from
|
29
|
+
from PyQt6.QtCore import pyqtSlot
|
30
|
+
from PyQt6.QtWidgets import (
|
31
31
|
QAbstractItemView, QComboBox, QDialogButtonBox, QGridLayout, QLabel,
|
32
32
|
QListWidget, QListWidgetItem, QVBoxLayout, QWidget
|
33
33
|
)
|
34
34
|
|
35
|
-
from novelwriter import
|
36
|
-
from novelwriter.extensions.configlayout import
|
35
|
+
from novelwriter import SHARED
|
36
|
+
from novelwriter.extensions.configlayout import NColorLabel
|
37
37
|
from novelwriter.extensions.modified import NDialog
|
38
38
|
from novelwriter.extensions.switch import NSwitch
|
39
39
|
from novelwriter.types import QtAccepted, QtDialogCancel, QtDialogOk, QtUserRole
|
@@ -60,16 +60,13 @@ class GuiDocSplit(NDialog):
|
|
60
60
|
|
61
61
|
self.headLabel = QLabel(self.tr("Document Headings"), self)
|
62
62
|
self.headLabel.setFont(SHARED.theme.guiFontB)
|
63
|
-
self.helpLabel =
|
63
|
+
self.helpLabel = NColorLabel(
|
64
64
|
self.tr("Select the maximum level to split into files."),
|
65
65
|
self, color=SHARED.theme.helpText, wrap=True
|
66
66
|
)
|
67
67
|
|
68
68
|
# Values
|
69
69
|
iPx = SHARED.theme.baseIconHeight
|
70
|
-
hSp = CONFIG.pxInt(12)
|
71
|
-
vSp = CONFIG.pxInt(8)
|
72
|
-
bSp = CONFIG.pxInt(12)
|
73
70
|
|
74
71
|
options = SHARED.project.options
|
75
72
|
spLevel = options.getInt("GuiDocSplit", "spLevel", 3)
|
@@ -79,11 +76,11 @@ class GuiDocSplit(NDialog):
|
|
79
76
|
# Heading Selection
|
80
77
|
self.listBox = QListWidget(self)
|
81
78
|
self.listBox.setDragDropMode(QAbstractItemView.DragDropMode.NoDragDrop)
|
82
|
-
self.listBox.setMinimumWidth(
|
83
|
-
self.listBox.setMinimumHeight(
|
79
|
+
self.listBox.setMinimumWidth(400)
|
80
|
+
self.listBox.setMinimumHeight(180)
|
84
81
|
|
85
82
|
self.splitLevel = QComboBox(self)
|
86
|
-
self.splitLevel.addItem(self.tr("Split on Heading Level 1 (Partition)"),
|
83
|
+
self.splitLevel.addItem(self.tr("Split on Heading Level 1 (Partition)"), 1)
|
87
84
|
self.splitLevel.addItem(self.tr("Split up to Heading Level 2 (Chapter)"), 2)
|
88
85
|
self.splitLevel.addItem(self.tr("Split up to Heading Level 3 (Scene)"), 3)
|
89
86
|
self.splitLevel.addItem(self.tr("Split up to Heading Level 4 (Section)"), 4)
|
@@ -111,8 +108,8 @@ class GuiDocSplit(NDialog):
|
|
111
108
|
self.optBox.addWidget(self.hierarchySwitch, 1, 1)
|
112
109
|
self.optBox.addWidget(self.trashLabel, 2, 0)
|
113
110
|
self.optBox.addWidget(self.trashSwitch, 2, 1)
|
114
|
-
self.optBox.setVerticalSpacing(
|
115
|
-
self.optBox.setHorizontalSpacing(
|
111
|
+
self.optBox.setVerticalSpacing(8)
|
112
|
+
self.optBox.setHorizontalSpacing(12)
|
116
113
|
self.optBox.setColumnStretch(3, 1)
|
117
114
|
|
118
115
|
# Buttons
|
@@ -125,12 +122,12 @@ class GuiDocSplit(NDialog):
|
|
125
122
|
self.outerBox.setSpacing(0)
|
126
123
|
self.outerBox.addWidget(self.headLabel)
|
127
124
|
self.outerBox.addWidget(self.helpLabel)
|
128
|
-
self.outerBox.addSpacing(
|
125
|
+
self.outerBox.addSpacing(8)
|
129
126
|
self.outerBox.addWidget(self.listBox)
|
130
127
|
self.outerBox.addWidget(self.splitLevel)
|
131
|
-
self.outerBox.addSpacing(
|
128
|
+
self.outerBox.addSpacing(8)
|
132
129
|
self.outerBox.addLayout(self.optBox)
|
133
|
-
self.outerBox.addSpacing(
|
130
|
+
self.outerBox.addSpacing(12)
|
134
131
|
self.outerBox.addWidget(self.buttonBox)
|
135
132
|
self.setLayout(self.outerBox)
|
136
133
|
|
@@ -181,11 +178,11 @@ class GuiDocSplit(NDialog):
|
|
181
178
|
@classmethod
|
182
179
|
def getData(cls, parent: QWidget, handle: str) -> tuple[dict, list[str], bool]:
|
183
180
|
"""Pop the dialog and return the result."""
|
184
|
-
|
185
|
-
|
186
|
-
data, text =
|
187
|
-
accepted =
|
188
|
-
|
181
|
+
dialog = cls(parent, handle)
|
182
|
+
dialog.exec()
|
183
|
+
data, text = dialog.data()
|
184
|
+
accepted = dialog.result() == QtAccepted
|
185
|
+
dialog.softDelete()
|
189
186
|
return data, text, accepted
|
190
187
|
|
191
188
|
##
|
@@ -195,8 +192,8 @@ class GuiDocSplit(NDialog):
|
|
195
192
|
@pyqtSlot()
|
196
193
|
def _reloadList(self) -> None:
|
197
194
|
"""Reload the content of the list box."""
|
198
|
-
sHandle
|
199
|
-
|
195
|
+
if sHandle := self._data.get("sHandle"):
|
196
|
+
self._loadContent(sHandle)
|
200
197
|
return
|
201
198
|
|
202
199
|
##
|
novelwriter/dialogs/editlabel.py
CHANGED
@@ -25,9 +25,8 @@ from __future__ import annotations
|
|
25
25
|
|
26
26
|
import logging
|
27
27
|
|
28
|
-
from
|
28
|
+
from PyQt6.QtWidgets import QDialogButtonBox, QHBoxLayout, QLabel, QLineEdit, QVBoxLayout, QWidget
|
29
29
|
|
30
|
-
from novelwriter import CONFIG
|
31
30
|
from novelwriter.extensions.modified import NDialog
|
32
31
|
from novelwriter.types import QtAccepted, QtDialogCancel, QtDialogOk
|
33
32
|
|
@@ -43,12 +42,9 @@ class GuiEditLabel(NDialog):
|
|
43
42
|
self.setObjectName("GuiEditLabel")
|
44
43
|
self.setWindowTitle(self.tr("Item Label"))
|
45
44
|
|
46
|
-
mVd = CONFIG.pxInt(220)
|
47
|
-
mSp = CONFIG.pxInt(12)
|
48
|
-
|
49
45
|
# Item Label
|
50
46
|
self.labelValue = QLineEdit(self)
|
51
|
-
self.labelValue.setMinimumWidth(
|
47
|
+
self.labelValue.setMinimumWidth(220)
|
52
48
|
self.labelValue.setMaxLength(200)
|
53
49
|
self.labelValue.setText(text)
|
54
50
|
self.labelValue.selectAll()
|
@@ -62,10 +58,10 @@ class GuiEditLabel(NDialog):
|
|
62
58
|
self.innerBox = QHBoxLayout()
|
63
59
|
self.innerBox.addWidget(QLabel(self.tr("Label"), self), 0)
|
64
60
|
self.innerBox.addWidget(self.labelValue, 1)
|
65
|
-
self.innerBox.setSpacing(
|
61
|
+
self.innerBox.setSpacing(12)
|
66
62
|
|
67
63
|
self.outerBox = QVBoxLayout()
|
68
|
-
self.outerBox.setSpacing(
|
64
|
+
self.outerBox.setSpacing(12)
|
69
65
|
self.outerBox.addLayout(self.innerBox, 1)
|
70
66
|
self.outerBox.addWidget(self.buttonBox, 0)
|
71
67
|
|
@@ -86,9 +82,9 @@ class GuiEditLabel(NDialog):
|
|
86
82
|
@classmethod
|
87
83
|
def getLabel(cls, parent: QWidget, text: str) -> tuple[str, bool]:
|
88
84
|
"""Pop the dialog and return the result."""
|
89
|
-
|
90
|
-
|
91
|
-
label =
|
92
|
-
accepted =
|
93
|
-
|
85
|
+
dialog = cls(parent, text=text)
|
86
|
+
dialog.exec()
|
87
|
+
label = dialog.itemLabel
|
88
|
+
accepted = dialog.result() == QtAccepted
|
89
|
+
dialog.softDelete()
|
94
90
|
return label, accepted
|
@@ -26,18 +26,19 @@ from __future__ import annotations
|
|
26
26
|
|
27
27
|
import logging
|
28
28
|
|
29
|
-
from
|
30
|
-
from
|
31
|
-
from
|
29
|
+
from PyQt6.QtCore import Qt, pyqtSignal, pyqtSlot
|
30
|
+
from PyQt6.QtGui import QAction, QCloseEvent, QKeyEvent, QKeySequence
|
31
|
+
from PyQt6.QtWidgets import (
|
32
32
|
QCompleter, QDialogButtonBox, QFileDialog, QHBoxLayout, QLineEdit,
|
33
33
|
QPushButton, QVBoxLayout, QWidget
|
34
34
|
)
|
35
35
|
|
36
36
|
from novelwriter import CONFIG, SHARED
|
37
37
|
from novelwriter.common import compact, describeFont, uniqueCompact
|
38
|
-
from novelwriter.
|
38
|
+
from novelwriter.config import DEF_GUI, DEF_ICONS, DEF_SYNTAX, DEF_TREECOL
|
39
|
+
from novelwriter.constants import nwLabels, nwUnicode, trConst
|
39
40
|
from novelwriter.dialogs.quotes import GuiQuoteSelect
|
40
|
-
from novelwriter.extensions.configlayout import
|
41
|
+
from novelwriter.extensions.configlayout import NColorLabel, NScrollableForm
|
41
42
|
from novelwriter.extensions.modified import (
|
42
43
|
NComboBox, NDialog, NDoubleSpinBox, NIconToolButton, NSpinBox
|
43
44
|
)
|
@@ -58,23 +59,23 @@ class GuiPreferences(NDialog):
|
|
58
59
|
logger.debug("Create: GuiPreferences")
|
59
60
|
self.setObjectName("GuiPreferences")
|
60
61
|
self.setWindowTitle(self.tr("Preferences"))
|
61
|
-
self.setMinimumSize(
|
62
|
-
self.resize(*CONFIG.
|
62
|
+
self.setMinimumSize(600, 500)
|
63
|
+
self.resize(*CONFIG.prefsWinSize)
|
63
64
|
|
64
65
|
# Title
|
65
|
-
self.titleLabel =
|
66
|
+
self.titleLabel = NColorLabel(
|
66
67
|
self.tr("Preferences"), self, color=SHARED.theme.helpText,
|
67
|
-
scale=
|
68
|
+
scale=NColorLabel.HEADER_SCALE, indent=4,
|
68
69
|
)
|
69
70
|
|
70
71
|
# Search Box
|
72
|
+
self.searchAction = QAction(SHARED.theme.getIcon("search"), "")
|
73
|
+
self.searchAction.triggered.connect(self._gotoSearch)
|
74
|
+
|
71
75
|
self.searchText = QLineEdit(self)
|
72
76
|
self.searchText.setPlaceholderText(self.tr("Search"))
|
73
|
-
self.searchText.setMinimumWidth(
|
74
|
-
self.searchAction
|
75
|
-
SHARED.theme.getIcon("search"), QLineEdit.ActionPosition.TrailingPosition
|
76
|
-
)
|
77
|
-
self.searchAction.triggered.connect(self._gotoSearch)
|
77
|
+
self.searchText.setMinimumWidth(200)
|
78
|
+
self.searchText.addAction(self.searchAction, QLineEdit.ActionPosition.TrailingPosition)
|
78
79
|
|
79
80
|
# SideBar
|
80
81
|
self.sidebar = NPagedSideBar(self)
|
@@ -105,7 +106,7 @@ class GuiPreferences(NDialog):
|
|
105
106
|
self.outerBox.addLayout(self.searchBox)
|
106
107
|
self.outerBox.addLayout(self.mainBox)
|
107
108
|
self.outerBox.addWidget(self.buttonBox)
|
108
|
-
self.outerBox.setSpacing(
|
109
|
+
self.outerBox.setSpacing(8)
|
109
110
|
|
110
111
|
self.setLayout(self.outerBox)
|
111
112
|
self.setSizeGripEnabled(True)
|
@@ -134,8 +135,6 @@ class GuiPreferences(NDialog):
|
|
134
135
|
section = 0
|
135
136
|
iSz = SHARED.theme.baseIconSize
|
136
137
|
boxFixed = 6*SHARED.theme.textNWidth
|
137
|
-
minWidth = CONFIG.pxInt(200)
|
138
|
-
fontWidth = CONFIG.pxInt(162)
|
139
138
|
|
140
139
|
# Temporary Variables
|
141
140
|
self._guiFont = CONFIG.guiFont
|
@@ -154,7 +153,7 @@ class GuiPreferences(NDialog):
|
|
154
153
|
|
155
154
|
# Display Language
|
156
155
|
self.guiLocale = NComboBox(self)
|
157
|
-
self.guiLocale.setMinimumWidth(
|
156
|
+
self.guiLocale.setMinimumWidth(200)
|
158
157
|
for lang, name in CONFIG.listLanguages(CONFIG.LANG_NW):
|
159
158
|
self.guiLocale.addItem(name, lang)
|
160
159
|
self.guiLocale.setCurrentData(CONFIG.guiLocale, "en_GB")
|
@@ -166,20 +165,32 @@ class GuiPreferences(NDialog):
|
|
166
165
|
|
167
166
|
# Colour Theme
|
168
167
|
self.guiTheme = NComboBox(self)
|
169
|
-
self.guiTheme.setMinimumWidth(
|
168
|
+
self.guiTheme.setMinimumWidth(200)
|
170
169
|
for theme, name in SHARED.theme.listThemes():
|
171
170
|
self.guiTheme.addItem(name, theme)
|
172
|
-
self.guiTheme.setCurrentData(CONFIG.guiTheme,
|
171
|
+
self.guiTheme.setCurrentData(CONFIG.guiTheme, DEF_GUI)
|
173
172
|
|
174
173
|
self.mainForm.addRow(
|
175
174
|
self.tr("Colour theme"), self.guiTheme,
|
176
|
-
self.tr("
|
175
|
+
self.tr("User interface colour theme."), stretch=(3, 2)
|
176
|
+
)
|
177
|
+
|
178
|
+
# Icon Theme
|
179
|
+
self.iconTheme = NComboBox(self)
|
180
|
+
self.iconTheme.setMinimumWidth(200)
|
181
|
+
for theme, name in SHARED.theme.iconCache.listThemes():
|
182
|
+
self.iconTheme.addItem(name, theme)
|
183
|
+
self.iconTheme.setCurrentData(CONFIG.iconTheme, DEF_ICONS)
|
184
|
+
|
185
|
+
self.mainForm.addRow(
|
186
|
+
self.tr("Icon theme"), self.iconTheme,
|
187
|
+
self.tr("User interface icon theme."), stretch=(3, 2)
|
177
188
|
)
|
178
189
|
|
179
190
|
# Application Font Family
|
180
191
|
self.guiFont = QLineEdit(self)
|
181
192
|
self.guiFont.setReadOnly(True)
|
182
|
-
self.guiFont.setMinimumWidth(
|
193
|
+
self.guiFont.setMinimumWidth(162)
|
183
194
|
self.guiFont.setText(describeFont(self._guiFont))
|
184
195
|
self.guiFont.setCursorPosition(0)
|
185
196
|
self.guiFontButton = NIconToolButton(self, iSz, "font")
|
@@ -224,10 +235,10 @@ class GuiPreferences(NDialog):
|
|
224
235
|
|
225
236
|
# Document Colour Theme
|
226
237
|
self.guiSyntax = NComboBox(self)
|
227
|
-
self.guiSyntax.setMinimumWidth(
|
238
|
+
self.guiSyntax.setMinimumWidth(200)
|
228
239
|
for syntax, name in SHARED.theme.listSyntax():
|
229
240
|
self.guiSyntax.addItem(name, syntax)
|
230
|
-
self.guiSyntax.setCurrentData(CONFIG.guiSyntax,
|
241
|
+
self.guiSyntax.setCurrentData(CONFIG.guiSyntax, DEF_SYNTAX)
|
231
242
|
|
232
243
|
self.mainForm.addRow(
|
233
244
|
self.tr("Document colour theme"), self.guiSyntax,
|
@@ -237,7 +248,7 @@ class GuiPreferences(NDialog):
|
|
237
248
|
# Document Font Family
|
238
249
|
self.textFont = QLineEdit(self)
|
239
250
|
self.textFont.setReadOnly(True)
|
240
|
-
self.textFont.setMinimumWidth(
|
251
|
+
self.textFont.setMinimumWidth(162)
|
241
252
|
self.textFont.setText(describeFont(CONFIG.textFont))
|
242
253
|
self.textFont.setCursorPosition(0)
|
243
254
|
self.textFontButton = NIconToolButton(self, iSz, "font")
|
@@ -248,14 +259,6 @@ class GuiPreferences(NDialog):
|
|
248
259
|
button=self.textFontButton
|
249
260
|
)
|
250
261
|
|
251
|
-
# Emphasise Labels
|
252
|
-
self.emphLabels = NSwitch(self)
|
253
|
-
self.emphLabels.setChecked(CONFIG.emphLabels)
|
254
|
-
self.mainForm.addRow(
|
255
|
-
self.tr("Emphasise partition and chapter labels"), self.emphLabels,
|
256
|
-
self.tr("Makes them stand out in the project tree."),
|
257
|
-
)
|
258
|
-
|
259
262
|
# Document Path
|
260
263
|
self.showFullPath = NSwitch(self)
|
261
264
|
self.showFullPath.setChecked(CONFIG.showFullPath)
|
@@ -271,6 +274,42 @@ class GuiPreferences(NDialog):
|
|
271
274
|
self.tr("Include project notes in status bar word count"), self.incNotesWCount
|
272
275
|
)
|
273
276
|
|
277
|
+
# Project View
|
278
|
+
# ============
|
279
|
+
|
280
|
+
title = self.tr("Project View")
|
281
|
+
section += 1
|
282
|
+
self.sidebar.addButton(title, section)
|
283
|
+
self.mainForm.addGroupLabel(title, section)
|
284
|
+
|
285
|
+
# Tree Icon Colours
|
286
|
+
self.iconColTree = NComboBox(self)
|
287
|
+
self.iconColTree.setMinimumWidth(200)
|
288
|
+
for key, label in nwLabels.THEME_COLORS.items():
|
289
|
+
self.iconColTree.addItem(trConst(label), key)
|
290
|
+
self.iconColTree.setCurrentData(CONFIG.iconColTree, DEF_TREECOL)
|
291
|
+
|
292
|
+
self.mainForm.addRow(
|
293
|
+
self.tr("Project tree icon colours"), self.iconColTree,
|
294
|
+
self.tr("Override colours for project icons."), stretch=(3, 2)
|
295
|
+
)
|
296
|
+
|
297
|
+
# Keep Theme Colours on Documents
|
298
|
+
self.iconColDocs = NSwitch(self)
|
299
|
+
self.iconColDocs.setChecked(CONFIG.iconColDocs)
|
300
|
+
self.mainForm.addRow(
|
301
|
+
self.tr("Keep theme colours on documents"), self.iconColDocs,
|
302
|
+
self.tr("Only override icon colours for folders.")
|
303
|
+
)
|
304
|
+
|
305
|
+
# Emphasise Labels
|
306
|
+
self.emphLabels = NSwitch(self)
|
307
|
+
self.emphLabels.setChecked(CONFIG.emphLabels)
|
308
|
+
self.mainForm.addRow(
|
309
|
+
self.tr("Emphasise partition and chapter labels"), self.emphLabels,
|
310
|
+
self.tr("Makes them stand out in the project tree."),
|
311
|
+
)
|
312
|
+
|
274
313
|
# Behaviour
|
275
314
|
# =========
|
276
315
|
|
@@ -393,7 +432,7 @@ class GuiPreferences(NDialog):
|
|
393
432
|
self.textWidth.setSingleStep(10)
|
394
433
|
self.textWidth.setValue(CONFIG.textWidth)
|
395
434
|
self.mainForm.addRow(
|
396
|
-
self.tr(
|
435
|
+
self.tr('Maximum text width in "Normal Mode"'), self.textWidth,
|
397
436
|
self.tr("Set to 0 to disable this feature."), unit=self.tr("px")
|
398
437
|
)
|
399
438
|
|
@@ -404,7 +443,7 @@ class GuiPreferences(NDialog):
|
|
404
443
|
self.focusWidth.setSingleStep(10)
|
405
444
|
self.focusWidth.setValue(CONFIG.focusWidth)
|
406
445
|
self.mainForm.addRow(
|
407
|
-
self.tr(
|
446
|
+
self.tr('Maximum text width in "Focus Mode"'), self.focusWidth,
|
408
447
|
self.tr("The maximum width cannot be disabled."), unit=self.tr("px")
|
409
448
|
)
|
410
449
|
|
@@ -412,7 +451,7 @@ class GuiPreferences(NDialog):
|
|
412
451
|
self.hideFocusFooter = NSwitch(self)
|
413
452
|
self.hideFocusFooter.setChecked(CONFIG.hideFocusFooter)
|
414
453
|
self.mainForm.addRow(
|
415
|
-
self.tr(
|
454
|
+
self.tr('Hide document footer in "Focus Mode"'), self.hideFocusFooter,
|
416
455
|
self.tr("Hide the information bar in the document editor.")
|
417
456
|
)
|
418
457
|
|
@@ -458,7 +497,7 @@ class GuiPreferences(NDialog):
|
|
458
497
|
|
459
498
|
# Spell Checking
|
460
499
|
self.spellLanguage = NComboBox(self)
|
461
|
-
self.spellLanguage.setMinimumWidth(
|
500
|
+
self.spellLanguage.setMinimumWidth(200)
|
462
501
|
|
463
502
|
if CONFIG.hasEnchant:
|
464
503
|
for tag, language in SHARED.spelling.listDictionaries():
|
@@ -483,6 +522,18 @@ class GuiPreferences(NDialog):
|
|
483
522
|
self.tr("Apply formatting to word under cursor if no selection is made.")
|
484
523
|
)
|
485
524
|
|
525
|
+
# Cursor Width
|
526
|
+
self.cursorWidth = NSpinBox(self)
|
527
|
+
self.cursorWidth.setMinimum(1)
|
528
|
+
self.cursorWidth.setMaximum(20)
|
529
|
+
self.cursorWidth.setSingleStep(1)
|
530
|
+
self.cursorWidth.setValue(CONFIG.cursorWidth)
|
531
|
+
self.mainForm.addRow(
|
532
|
+
self.tr("Cursor width"), self.cursorWidth,
|
533
|
+
self.tr("The width of the text cursor of the editor."),
|
534
|
+
unit=self.tr("px")
|
535
|
+
)
|
536
|
+
|
486
537
|
# Show Tabs and Spaces
|
487
538
|
self.showTabsNSpaces = NSwitch(self)
|
488
539
|
self.showTabsNSpaces.setChecked(CONFIG.showTabsNSpaces)
|
@@ -509,7 +560,7 @@ class GuiPreferences(NDialog):
|
|
509
560
|
self.scrollPastEnd = NSwitch(self)
|
510
561
|
self.scrollPastEnd.setChecked(CONFIG.scrollPastEnd)
|
511
562
|
self.mainForm.addRow(
|
512
|
-
self.tr("Scroll past end of the document"), self.scrollPastEnd,
|
563
|
+
self.tr("Scroll past the end of the document"), self.scrollPastEnd,
|
513
564
|
self.tr("Also centres the cursor when scrolling.")
|
514
565
|
)
|
515
566
|
|
@@ -627,8 +678,6 @@ class GuiPreferences(NDialog):
|
|
627
678
|
self.sidebar.addButton(title, section)
|
628
679
|
self.mainForm.addGroupLabel(title, section)
|
629
680
|
|
630
|
-
boxWidth = CONFIG.pxInt(150)
|
631
|
-
|
632
681
|
# Auto-Replace as You Type Main Switch
|
633
682
|
self.doReplace = NSwitch(self)
|
634
683
|
self.doReplace.setChecked(CONFIG.doReplace)
|
@@ -677,7 +726,7 @@ class GuiPreferences(NDialog):
|
|
677
726
|
# Pad Before
|
678
727
|
self.fmtPadBefore = QLineEdit(self)
|
679
728
|
self.fmtPadBefore.setMaxLength(32)
|
680
|
-
self.fmtPadBefore.setMinimumWidth(
|
729
|
+
self.fmtPadBefore.setMinimumWidth(150)
|
681
730
|
self.fmtPadBefore.setText(CONFIG.fmtPadBefore)
|
682
731
|
self.mainForm.addRow(
|
683
732
|
self.tr("Insert non-breaking space before"), self.fmtPadBefore,
|
@@ -687,7 +736,7 @@ class GuiPreferences(NDialog):
|
|
687
736
|
# Pad After
|
688
737
|
self.fmtPadAfter = QLineEdit(self)
|
689
738
|
self.fmtPadAfter.setMaxLength(32)
|
690
|
-
self.fmtPadAfter.setMinimumWidth(
|
739
|
+
self.fmtPadAfter.setMinimumWidth(150)
|
691
740
|
self.fmtPadAfter.setText(CONFIG.fmtPadAfter)
|
692
741
|
self.mainForm.addRow(
|
693
742
|
self.tr("Insert non-breaking space after"), self.fmtPadAfter,
|
@@ -908,33 +957,46 @@ class GuiPreferences(NDialog):
|
|
908
957
|
refreshTree = False
|
909
958
|
|
910
959
|
# Appearance
|
911
|
-
guiLocale
|
912
|
-
guiTheme
|
960
|
+
guiLocale = self.guiLocale.currentData()
|
961
|
+
guiTheme = self.guiTheme.currentData()
|
962
|
+
iconTheme = self.iconTheme.currentData()
|
913
963
|
|
914
964
|
updateTheme |= CONFIG.guiTheme != guiTheme
|
965
|
+
updateTheme |= CONFIG.iconTheme != iconTheme
|
915
966
|
needsRestart |= CONFIG.guiLocale != guiLocale
|
916
967
|
needsRestart |= CONFIG.guiFont != self._guiFont
|
917
968
|
|
918
969
|
CONFIG.guiLocale = guiLocale
|
919
970
|
CONFIG.guiTheme = guiTheme
|
971
|
+
CONFIG.iconTheme = iconTheme
|
920
972
|
CONFIG.hideVScroll = self.hideVScroll.isChecked()
|
921
973
|
CONFIG.hideHScroll = self.hideHScroll.isChecked()
|
922
974
|
CONFIG.nativeFont = self.nativeFont.isChecked()
|
923
975
|
CONFIG.setGuiFont(self._guiFont)
|
924
976
|
|
925
977
|
# Document Style
|
926
|
-
guiSyntax
|
927
|
-
emphLabels = self.emphLabels.isChecked()
|
978
|
+
guiSyntax = self.guiSyntax.currentData()
|
928
979
|
|
929
980
|
updateSyntax |= CONFIG.guiSyntax != guiSyntax
|
930
|
-
refreshTree |= CONFIG.emphLabels != emphLabels
|
931
981
|
|
932
982
|
CONFIG.guiSyntax = guiSyntax
|
933
|
-
CONFIG.emphLabels = emphLabels
|
934
983
|
CONFIG.showFullPath = self.showFullPath.isChecked()
|
935
984
|
CONFIG.incNotesWCount = self.incNotesWCount.isChecked()
|
936
985
|
CONFIG.setTextFont(self._textFont)
|
937
986
|
|
987
|
+
# Project View
|
988
|
+
iconColTree = self.iconColTree.currentData()
|
989
|
+
iconColDocs = self.iconColDocs.isChecked()
|
990
|
+
emphLabels = self.emphLabels.isChecked()
|
991
|
+
|
992
|
+
updateTheme |= CONFIG.iconColTree != iconColTree
|
993
|
+
updateTheme |= CONFIG.iconColDocs != iconColDocs
|
994
|
+
refreshTree |= CONFIG.emphLabels != emphLabels
|
995
|
+
|
996
|
+
CONFIG.iconColTree = iconColTree
|
997
|
+
CONFIG.iconColDocs = iconColDocs
|
998
|
+
CONFIG.emphLabels = emphLabels
|
999
|
+
|
938
1000
|
# Behaviour
|
939
1001
|
CONFIG.autoSaveDoc = self.autoSaveDoc.value()
|
940
1002
|
CONFIG.autoSaveProj = self.autoSaveProj.value()
|
@@ -960,6 +1022,7 @@ class GuiPreferences(NDialog):
|
|
960
1022
|
# Text Editing
|
961
1023
|
CONFIG.spellLanguage = self.spellLanguage.currentData()
|
962
1024
|
CONFIG.autoSelect = self.autoSelect.isChecked()
|
1025
|
+
CONFIG.cursorWidth = self.cursorWidth.value()
|
963
1026
|
CONFIG.showTabsNSpaces = self.showTabsNSpaces.isChecked()
|
964
1027
|
CONFIG.showLineEndings = self.showLineEndings.isChecked()
|
965
1028
|
|