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.
Files changed (334) hide show
  1. novelwriter/__init__.py +84 -74
  2. novelwriter/assets/i18n/nw_cs_CZ.qm +0 -0
  3. novelwriter/assets/i18n/nw_de_DE.qm +0 -0
  4. novelwriter/assets/i18n/nw_en_US.qm +0 -0
  5. novelwriter/assets/i18n/nw_es_419.qm +0 -0
  6. novelwriter/assets/i18n/nw_fr_FR.qm +0 -0
  7. novelwriter/assets/i18n/nw_it_IT.qm +0 -0
  8. novelwriter/assets/i18n/nw_ja_JP.qm +0 -0
  9. novelwriter/assets/i18n/nw_nb_NO.qm +0 -0
  10. novelwriter/assets/i18n/nw_nl_NL.qm +0 -0
  11. novelwriter/assets/i18n/nw_pl_PL.qm +0 -0
  12. novelwriter/assets/i18n/nw_pt_BR.qm +0 -0
  13. novelwriter/assets/i18n/nw_ru_RU.qm +0 -0
  14. novelwriter/assets/i18n/nw_zh_CN.qm +0 -0
  15. novelwriter/assets/i18n/project_en_GB.json +1 -0
  16. novelwriter/assets/icons/font_awesome.icons +109 -0
  17. novelwriter/assets/icons/material_filled_bold.icons +109 -0
  18. novelwriter/assets/icons/material_filled_normal.icons +109 -0
  19. novelwriter/assets/icons/material_filled_thin.icons +109 -0
  20. novelwriter/assets/icons/material_rounded_bold.icons +109 -0
  21. novelwriter/assets/icons/material_rounded_normal.icons +109 -0
  22. novelwriter/assets/icons/material_rounded_thin.icons +109 -0
  23. novelwriter/assets/icons/remix_filled.icons +108 -0
  24. novelwriter/assets/icons/remix_outline.icons +108 -0
  25. novelwriter/assets/manual.pdf +0 -0
  26. novelwriter/assets/{manual_fr_FR.pdf → manual_fr.pdf} +0 -0
  27. novelwriter/assets/sample.zip +0 -0
  28. novelwriter/assets/syntax/cyberpunk_night.conf +1 -1
  29. novelwriter/assets/text/credits_en.htm +6 -6
  30. novelwriter/assets/themes/cyberpunk_night.conf +23 -7
  31. novelwriter/assets/themes/default_dark.conf +20 -4
  32. novelwriter/assets/themes/default_light.conf +21 -5
  33. novelwriter/assets/themes/dracula.conf +20 -4
  34. novelwriter/assets/themes/solarized_dark.conf +24 -8
  35. novelwriter/assets/themes/solarized_light.conf +22 -6
  36. novelwriter/common.py +33 -26
  37. novelwriter/config.py +118 -127
  38. novelwriter/constants.py +75 -56
  39. novelwriter/core/buildsettings.py +23 -16
  40. novelwriter/core/coretools.py +11 -7
  41. novelwriter/core/docbuild.py +19 -13
  42. novelwriter/core/document.py +2 -2
  43. novelwriter/core/index.py +142 -432
  44. novelwriter/core/indexdata.py +403 -0
  45. novelwriter/core/item.py +35 -28
  46. novelwriter/core/itemmodel.py +27 -26
  47. novelwriter/core/novelmodel.py +223 -0
  48. novelwriter/core/options.py +1 -1
  49. novelwriter/core/project.py +10 -11
  50. novelwriter/core/projectdata.py +5 -5
  51. novelwriter/core/projectxml.py +1 -1
  52. novelwriter/core/sessions.py +3 -2
  53. novelwriter/core/spellcheck.py +4 -3
  54. novelwriter/core/status.py +12 -15
  55. novelwriter/core/storage.py +1 -1
  56. novelwriter/core/tree.py +46 -8
  57. novelwriter/dialogs/about.py +19 -22
  58. novelwriter/dialogs/docmerge.py +21 -23
  59. novelwriter/dialogs/docsplit.py +20 -23
  60. novelwriter/dialogs/editlabel.py +9 -13
  61. novelwriter/dialogs/preferences.py +111 -48
  62. novelwriter/dialogs/projectsettings.py +48 -54
  63. novelwriter/dialogs/quotes.py +14 -19
  64. novelwriter/dialogs/wordlist.py +25 -30
  65. novelwriter/enum.py +8 -0
  66. novelwriter/error.py +16 -16
  67. novelwriter/extensions/configlayout.py +18 -18
  68. novelwriter/extensions/eventfilters.py +9 -5
  69. novelwriter/extensions/modified.py +34 -15
  70. novelwriter/extensions/novelselector.py +18 -5
  71. novelwriter/extensions/pagedsidebar.py +39 -49
  72. novelwriter/extensions/progressbars.py +10 -8
  73. novelwriter/extensions/statusled.py +6 -13
  74. novelwriter/extensions/switch.py +19 -30
  75. novelwriter/extensions/switchbox.py +7 -3
  76. novelwriter/extensions/versioninfo.py +4 -4
  77. novelwriter/formats/shared.py +1 -1
  78. novelwriter/formats/todocx.py +14 -10
  79. novelwriter/formats/tohtml.py +7 -5
  80. novelwriter/formats/tokenizer.py +36 -33
  81. novelwriter/formats/tomarkdown.py +6 -2
  82. novelwriter/formats/toodt.py +27 -22
  83. novelwriter/formats/toqdoc.py +19 -14
  84. novelwriter/formats/toraw.py +6 -2
  85. novelwriter/gui/doceditor.py +216 -265
  86. novelwriter/gui/dochighlight.py +46 -45
  87. novelwriter/gui/docviewer.py +102 -104
  88. novelwriter/gui/docviewerpanel.py +47 -51
  89. novelwriter/gui/editordocument.py +8 -5
  90. novelwriter/gui/itemdetails.py +15 -18
  91. novelwriter/gui/mainmenu.py +147 -146
  92. novelwriter/gui/noveltree.py +239 -405
  93. novelwriter/gui/outline.py +137 -76
  94. novelwriter/gui/projtree.py +138 -132
  95. novelwriter/gui/search.py +33 -31
  96. novelwriter/gui/sidebar.py +13 -18
  97. novelwriter/gui/statusbar.py +13 -15
  98. novelwriter/gui/theme.py +533 -430
  99. novelwriter/guimain.py +27 -29
  100. novelwriter/shared.py +32 -23
  101. novelwriter/text/comments.py +70 -0
  102. novelwriter/text/patterns.py +4 -4
  103. novelwriter/tools/dictionaries.py +20 -29
  104. novelwriter/tools/lipsum.py +16 -17
  105. novelwriter/tools/manusbuild.py +39 -42
  106. novelwriter/tools/manuscript.py +113 -126
  107. novelwriter/tools/manussettings.py +78 -83
  108. novelwriter/tools/noveldetails.py +51 -64
  109. novelwriter/tools/welcome.py +56 -75
  110. novelwriter/tools/writingstats.py +44 -57
  111. novelwriter/types.py +5 -7
  112. {novelWriter-2.6.2.dist-info → novelwriter-2.7b1.dist-info}/METADATA +6 -6
  113. novelwriter-2.7b1.dist-info/RECORD +159 -0
  114. {novelWriter-2.6.2.dist-info → novelwriter-2.7b1.dist-info}/WHEEL +1 -1
  115. novelWriter-2.6.2.dist-info/RECORD +0 -363
  116. novelwriter/assets/icons/typicons_dark/README.md +0 -29
  117. novelwriter/assets/icons/typicons_dark/icons.conf +0 -134
  118. novelwriter/assets/icons/typicons_dark/mixed_copy.svg +0 -4
  119. novelwriter/assets/icons/typicons_dark/mixed_document-chapter.svg +0 -12
  120. novelwriter/assets/icons/typicons_dark/mixed_document-new.svg +0 -6
  121. novelwriter/assets/icons/typicons_dark/mixed_document-note.svg +0 -12
  122. novelwriter/assets/icons/typicons_dark/mixed_document-scene.svg +0 -12
  123. novelwriter/assets/icons/typicons_dark/mixed_document-section.svg +0 -12
  124. novelwriter/assets/icons/typicons_dark/mixed_document-title.svg +0 -12
  125. novelwriter/assets/icons/typicons_dark/mixed_edit.svg +0 -4
  126. novelwriter/assets/icons/typicons_dark/mixed_import.svg +0 -5
  127. novelwriter/assets/icons/typicons_dark/mixed_input-checked.svg +0 -5
  128. novelwriter/assets/icons/typicons_dark/mixed_input-none.svg +0 -5
  129. novelwriter/assets/icons/typicons_dark/mixed_input-unchecked.svg +0 -5
  130. novelwriter/assets/icons/typicons_dark/mixed_margin-bottom.svg +0 -6
  131. novelwriter/assets/icons/typicons_dark/mixed_margin-left.svg +0 -6
  132. novelwriter/assets/icons/typicons_dark/mixed_margin-right.svg +0 -6
  133. novelwriter/assets/icons/typicons_dark/mixed_margin-top.svg +0 -6
  134. novelwriter/assets/icons/typicons_dark/mixed_search-replace.svg +0 -6
  135. novelwriter/assets/icons/typicons_dark/mixed_size-height.svg +0 -6
  136. novelwriter/assets/icons/typicons_dark/mixed_size-width.svg +0 -6
  137. novelwriter/assets/icons/typicons_dark/nw_deco-h0.svg +0 -4
  138. novelwriter/assets/icons/typicons_dark/nw_deco-h1.svg +0 -4
  139. novelwriter/assets/icons/typicons_dark/nw_deco-h2-narrow.svg +0 -4
  140. novelwriter/assets/icons/typicons_dark/nw_deco-h2.svg +0 -4
  141. novelwriter/assets/icons/typicons_dark/nw_deco-h3-narrow.svg +0 -4
  142. novelwriter/assets/icons/typicons_dark/nw_deco-h3.svg +0 -4
  143. novelwriter/assets/icons/typicons_dark/nw_deco-h4-narrow.svg +0 -4
  144. novelwriter/assets/icons/typicons_dark/nw_deco-h4.svg +0 -4
  145. novelwriter/assets/icons/typicons_dark/nw_deco-note.svg +0 -4
  146. novelwriter/assets/icons/typicons_dark/nw_deco-noveltree-more.svg +0 -4
  147. novelwriter/assets/icons/typicons_dark/nw_font.svg +0 -4
  148. novelwriter/assets/icons/typicons_dark/nw_panel.svg +0 -4
  149. novelwriter/assets/icons/typicons_dark/nw_quote.svg +0 -4
  150. novelwriter/assets/icons/typicons_dark/nw_search-case.svg +0 -4
  151. novelwriter/assets/icons/typicons_dark/nw_search-preserve.svg +0 -4
  152. novelwriter/assets/icons/typicons_dark/nw_search-regex.svg +0 -4
  153. novelwriter/assets/icons/typicons_dark/nw_search-word.svg +0 -4
  154. novelwriter/assets/icons/typicons_dark/nw_tb-bold-md.svg +0 -4
  155. novelwriter/assets/icons/typicons_dark/nw_tb-bold.svg +0 -6
  156. novelwriter/assets/icons/typicons_dark/nw_tb-italic-md.svg +0 -4
  157. novelwriter/assets/icons/typicons_dark/nw_tb-italic.svg +0 -6
  158. novelwriter/assets/icons/typicons_dark/nw_tb-mark.svg +0 -7
  159. novelwriter/assets/icons/typicons_dark/nw_tb-strike-md.svg +0 -4
  160. novelwriter/assets/icons/typicons_dark/nw_tb-strike.svg +0 -6
  161. novelwriter/assets/icons/typicons_dark/nw_tb-subscript.svg +0 -7
  162. novelwriter/assets/icons/typicons_dark/nw_tb-superscript.svg +0 -7
  163. novelwriter/assets/icons/typicons_dark/nw_tb-underline.svg +0 -7
  164. novelwriter/assets/icons/typicons_dark/nw_toolbar.svg +0 -5
  165. novelwriter/assets/icons/typicons_dark/typ_arrow-down-thick-grey.svg +0 -4
  166. novelwriter/assets/icons/typicons_dark/typ_arrow-forward.svg +0 -4
  167. novelwriter/assets/icons/typicons_dark/typ_arrow-maximise.svg +0 -4
  168. novelwriter/assets/icons/typicons_dark/typ_arrow-minimise.svg +0 -4
  169. novelwriter/assets/icons/typicons_dark/typ_arrow-repeat-grey.svg +0 -4
  170. novelwriter/assets/icons/typicons_dark/typ_book-grey.svg +0 -4
  171. novelwriter/assets/icons/typicons_dark/typ_book.svg +0 -6
  172. novelwriter/assets/icons/typicons_dark/typ_bookmark.svg +0 -4
  173. novelwriter/assets/icons/typicons_dark/typ_calendar.svg +0 -4
  174. novelwriter/assets/icons/typicons_dark/typ_cancel-grey.svg +0 -4
  175. novelwriter/assets/icons/typicons_dark/typ_cancel.svg +0 -4
  176. novelwriter/assets/icons/typicons_dark/typ_chart-bar-grey.svg +0 -4
  177. novelwriter/assets/icons/typicons_dark/typ_chevron-down.svg +0 -4
  178. novelwriter/assets/icons/typicons_dark/typ_chevron-left.svg +0 -4
  179. novelwriter/assets/icons/typicons_dark/typ_chevron-right.svg +0 -4
  180. novelwriter/assets/icons/typicons_dark/typ_chevron-up.svg +0 -4
  181. novelwriter/assets/icons/typicons_dark/typ_cog.svg +0 -4
  182. novelwriter/assets/icons/typicons_dark/typ_delete-full.svg +0 -4
  183. novelwriter/assets/icons/typicons_dark/typ_delete.svg +0 -4
  184. novelwriter/assets/icons/typicons_dark/typ_directions-full.svg +0 -4
  185. novelwriter/assets/icons/typicons_dark/typ_document-add.svg +0 -4
  186. novelwriter/assets/icons/typicons_dark/typ_document-text.svg +0 -8
  187. novelwriter/assets/icons/typicons_dark/typ_document.svg +0 -4
  188. novelwriter/assets/icons/typicons_dark/typ_export-grey.svg +0 -4
  189. novelwriter/assets/icons/typicons_dark/typ_export.svg +0 -4
  190. novelwriter/assets/icons/typicons_dark/typ_eye.svg +0 -4
  191. novelwriter/assets/icons/typicons_dark/typ_flag.svg +0 -4
  192. novelwriter/assets/icons/typicons_dark/typ_folder-open.svg +0 -4
  193. novelwriter/assets/icons/typicons_dark/typ_folder.svg +0 -5
  194. novelwriter/assets/icons/typicons_dark/typ_globe-grey.svg +0 -4
  195. novelwriter/assets/icons/typicons_dark/typ_key.svg +0 -4
  196. novelwriter/assets/icons/typicons_dark/typ_lightbulb-full.svg +0 -4
  197. novelwriter/assets/icons/typicons_dark/typ_location.svg +0 -4
  198. novelwriter/assets/icons/typicons_dark/typ_media-pause-grey.svg +0 -4
  199. novelwriter/assets/icons/typicons_dark/typ_media-record-outline.svg +0 -4
  200. novelwriter/assets/icons/typicons_dark/typ_media-record.svg +0 -4
  201. novelwriter/assets/icons/typicons_dark/typ_minus.svg +0 -4
  202. novelwriter/assets/icons/typicons_dark/typ_pencil.svg +0 -5
  203. novelwriter/assets/icons/typicons_dark/typ_pin-outline.svg +0 -4
  204. novelwriter/assets/icons/typicons_dark/typ_pin.svg +0 -4
  205. novelwriter/assets/icons/typicons_dark/typ_plus.svg +0 -4
  206. novelwriter/assets/icons/typicons_dark/typ_puzzle-outline.svg +0 -4
  207. novelwriter/assets/icons/typicons_dark/typ_puzzle.svg +0 -4
  208. novelwriter/assets/icons/typicons_dark/typ_refresh-flipped.svg +0 -4
  209. novelwriter/assets/icons/typicons_dark/typ_refresh.svg +0 -4
  210. novelwriter/assets/icons/typicons_dark/typ_search-grey.svg +0 -4
  211. novelwriter/assets/icons/typicons_dark/typ_search.svg +0 -4
  212. novelwriter/assets/icons/typicons_dark/typ_star.svg +0 -4
  213. novelwriter/assets/icons/typicons_dark/typ_stopwatch-grey.svg +0 -4
  214. novelwriter/assets/icons/typicons_dark/typ_th-dot-menu.svg +0 -4
  215. novelwriter/assets/icons/typicons_dark/typ_th-dot-more.svg +0 -4
  216. novelwriter/assets/icons/typicons_dark/typ_th-list-grey.svg +0 -4
  217. novelwriter/assets/icons/typicons_dark/typ_th-list.svg +0 -9
  218. novelwriter/assets/icons/typicons_dark/typ_times.svg +0 -4
  219. novelwriter/assets/icons/typicons_dark/typ_trash.svg +0 -5
  220. novelwriter/assets/icons/typicons_dark/typ_unfold-hidden.svg +0 -4
  221. novelwriter/assets/icons/typicons_dark/typ_unfold-visible.svg +0 -4
  222. novelwriter/assets/icons/typicons_dark/typ_user.svg +0 -5
  223. novelwriter/assets/icons/typicons_dark/typ_warning-full.svg +0 -4
  224. novelwriter/assets/icons/typicons_light/README.md +0 -29
  225. novelwriter/assets/icons/typicons_light/icons.conf +0 -134
  226. novelwriter/assets/icons/typicons_light/mixed_copy.svg +0 -4
  227. novelwriter/assets/icons/typicons_light/mixed_document-chapter.svg +0 -12
  228. novelwriter/assets/icons/typicons_light/mixed_document-new.svg +0 -6
  229. novelwriter/assets/icons/typicons_light/mixed_document-note.svg +0 -12
  230. novelwriter/assets/icons/typicons_light/mixed_document-scene.svg +0 -12
  231. novelwriter/assets/icons/typicons_light/mixed_document-section.svg +0 -12
  232. novelwriter/assets/icons/typicons_light/mixed_document-title.svg +0 -12
  233. novelwriter/assets/icons/typicons_light/mixed_edit.svg +0 -4
  234. novelwriter/assets/icons/typicons_light/mixed_import.svg +0 -5
  235. novelwriter/assets/icons/typicons_light/mixed_input-checked.svg +0 -5
  236. novelwriter/assets/icons/typicons_light/mixed_input-none.svg +0 -5
  237. novelwriter/assets/icons/typicons_light/mixed_input-unchecked.svg +0 -5
  238. novelwriter/assets/icons/typicons_light/mixed_margin-bottom.svg +0 -6
  239. novelwriter/assets/icons/typicons_light/mixed_margin-left.svg +0 -6
  240. novelwriter/assets/icons/typicons_light/mixed_margin-right.svg +0 -6
  241. novelwriter/assets/icons/typicons_light/mixed_margin-top.svg +0 -6
  242. novelwriter/assets/icons/typicons_light/mixed_search-replace.svg +0 -6
  243. novelwriter/assets/icons/typicons_light/mixed_size-height.svg +0 -6
  244. novelwriter/assets/icons/typicons_light/mixed_size-width.svg +0 -6
  245. novelwriter/assets/icons/typicons_light/nw_deco-h0.svg +0 -4
  246. novelwriter/assets/icons/typicons_light/nw_deco-h1.svg +0 -4
  247. novelwriter/assets/icons/typicons_light/nw_deco-h2-narrow.svg +0 -4
  248. novelwriter/assets/icons/typicons_light/nw_deco-h2.svg +0 -4
  249. novelwriter/assets/icons/typicons_light/nw_deco-h3-narrow.svg +0 -4
  250. novelwriter/assets/icons/typicons_light/nw_deco-h3.svg +0 -4
  251. novelwriter/assets/icons/typicons_light/nw_deco-h4-narrow.svg +0 -4
  252. novelwriter/assets/icons/typicons_light/nw_deco-h4.svg +0 -4
  253. novelwriter/assets/icons/typicons_light/nw_deco-note.svg +0 -4
  254. novelwriter/assets/icons/typicons_light/nw_deco-noveltree-more.svg +0 -4
  255. novelwriter/assets/icons/typicons_light/nw_font.svg +0 -4
  256. novelwriter/assets/icons/typicons_light/nw_panel.svg +0 -4
  257. novelwriter/assets/icons/typicons_light/nw_quote.svg +0 -4
  258. novelwriter/assets/icons/typicons_light/nw_search-case.svg +0 -4
  259. novelwriter/assets/icons/typicons_light/nw_search-preserve.svg +0 -4
  260. novelwriter/assets/icons/typicons_light/nw_search-regex.svg +0 -4
  261. novelwriter/assets/icons/typicons_light/nw_search-word.svg +0 -4
  262. novelwriter/assets/icons/typicons_light/nw_tb-bold-md.svg +0 -4
  263. novelwriter/assets/icons/typicons_light/nw_tb-bold.svg +0 -6
  264. novelwriter/assets/icons/typicons_light/nw_tb-italic-md.svg +0 -4
  265. novelwriter/assets/icons/typicons_light/nw_tb-italic.svg +0 -6
  266. novelwriter/assets/icons/typicons_light/nw_tb-mark.svg +0 -7
  267. novelwriter/assets/icons/typicons_light/nw_tb-strike-md.svg +0 -4
  268. novelwriter/assets/icons/typicons_light/nw_tb-strike.svg +0 -6
  269. novelwriter/assets/icons/typicons_light/nw_tb-subscript.svg +0 -7
  270. novelwriter/assets/icons/typicons_light/nw_tb-superscript.svg +0 -7
  271. novelwriter/assets/icons/typicons_light/nw_tb-underline.svg +0 -7
  272. novelwriter/assets/icons/typicons_light/nw_toolbar.svg +0 -5
  273. novelwriter/assets/icons/typicons_light/typ_arrow-down-thick-grey.svg +0 -4
  274. novelwriter/assets/icons/typicons_light/typ_arrow-forward.svg +0 -4
  275. novelwriter/assets/icons/typicons_light/typ_arrow-maximise.svg +0 -4
  276. novelwriter/assets/icons/typicons_light/typ_arrow-minimise.svg +0 -4
  277. novelwriter/assets/icons/typicons_light/typ_arrow-repeat-grey.svg +0 -4
  278. novelwriter/assets/icons/typicons_light/typ_book-grey.svg +0 -4
  279. novelwriter/assets/icons/typicons_light/typ_book.svg +0 -6
  280. novelwriter/assets/icons/typicons_light/typ_bookmark.svg +0 -4
  281. novelwriter/assets/icons/typicons_light/typ_calendar.svg +0 -4
  282. novelwriter/assets/icons/typicons_light/typ_cancel-grey.svg +0 -4
  283. novelwriter/assets/icons/typicons_light/typ_cancel.svg +0 -4
  284. novelwriter/assets/icons/typicons_light/typ_chart-bar-grey.svg +0 -4
  285. novelwriter/assets/icons/typicons_light/typ_chevron-down.svg +0 -4
  286. novelwriter/assets/icons/typicons_light/typ_chevron-left.svg +0 -4
  287. novelwriter/assets/icons/typicons_light/typ_chevron-right.svg +0 -4
  288. novelwriter/assets/icons/typicons_light/typ_chevron-up.svg +0 -4
  289. novelwriter/assets/icons/typicons_light/typ_cog.svg +0 -4
  290. novelwriter/assets/icons/typicons_light/typ_delete-full.svg +0 -4
  291. novelwriter/assets/icons/typicons_light/typ_delete.svg +0 -4
  292. novelwriter/assets/icons/typicons_light/typ_directions-full.svg +0 -4
  293. novelwriter/assets/icons/typicons_light/typ_document-add.svg +0 -4
  294. novelwriter/assets/icons/typicons_light/typ_document-text.svg +0 -5
  295. novelwriter/assets/icons/typicons_light/typ_document.svg +0 -4
  296. novelwriter/assets/icons/typicons_light/typ_export-grey.svg +0 -4
  297. novelwriter/assets/icons/typicons_light/typ_export.svg +0 -4
  298. novelwriter/assets/icons/typicons_light/typ_eye.svg +0 -4
  299. novelwriter/assets/icons/typicons_light/typ_flag.svg +0 -4
  300. novelwriter/assets/icons/typicons_light/typ_folder-open.svg +0 -4
  301. novelwriter/assets/icons/typicons_light/typ_folder.svg +0 -5
  302. novelwriter/assets/icons/typicons_light/typ_globe-grey.svg +0 -4
  303. novelwriter/assets/icons/typicons_light/typ_key.svg +0 -4
  304. novelwriter/assets/icons/typicons_light/typ_lightbulb-full.svg +0 -4
  305. novelwriter/assets/icons/typicons_light/typ_location.svg +0 -4
  306. novelwriter/assets/icons/typicons_light/typ_media-pause-grey.svg +0 -4
  307. novelwriter/assets/icons/typicons_light/typ_media-record-outline.svg +0 -4
  308. novelwriter/assets/icons/typicons_light/typ_media-record.svg +0 -4
  309. novelwriter/assets/icons/typicons_light/typ_minus.svg +0 -4
  310. novelwriter/assets/icons/typicons_light/typ_pencil.svg +0 -5
  311. novelwriter/assets/icons/typicons_light/typ_pin-outline.svg +0 -4
  312. novelwriter/assets/icons/typicons_light/typ_pin.svg +0 -4
  313. novelwriter/assets/icons/typicons_light/typ_plus.svg +0 -4
  314. novelwriter/assets/icons/typicons_light/typ_puzzle-outline.svg +0 -4
  315. novelwriter/assets/icons/typicons_light/typ_puzzle.svg +0 -4
  316. novelwriter/assets/icons/typicons_light/typ_refresh-flipped.svg +0 -4
  317. novelwriter/assets/icons/typicons_light/typ_refresh.svg +0 -4
  318. novelwriter/assets/icons/typicons_light/typ_search-grey.svg +0 -4
  319. novelwriter/assets/icons/typicons_light/typ_search.svg +0 -4
  320. novelwriter/assets/icons/typicons_light/typ_star.svg +0 -4
  321. novelwriter/assets/icons/typicons_light/typ_stopwatch-grey.svg +0 -4
  322. novelwriter/assets/icons/typicons_light/typ_th-dot-menu.svg +0 -4
  323. novelwriter/assets/icons/typicons_light/typ_th-dot-more.svg +0 -4
  324. novelwriter/assets/icons/typicons_light/typ_th-list-grey.svg +0 -4
  325. novelwriter/assets/icons/typicons_light/typ_th-list.svg +0 -9
  326. novelwriter/assets/icons/typicons_light/typ_times.svg +0 -4
  327. novelwriter/assets/icons/typicons_light/typ_trash.svg +0 -5
  328. novelwriter/assets/icons/typicons_light/typ_unfold-hidden.svg +0 -4
  329. novelwriter/assets/icons/typicons_light/typ_unfold-visible.svg +0 -4
  330. novelwriter/assets/icons/typicons_light/typ_user.svg +0 -5
  331. novelwriter/assets/icons/typicons_light/typ_warning-full.svg +0 -4
  332. {novelWriter-2.6.2.dist-info → novelwriter-2.7b1.dist-info}/entry_points.txt +0 -0
  333. {novelWriter-2.6.2.dist-info → novelwriter-2.7b1.dist-info/licenses}/LICENSE.md +0 -0
  334. {novelWriter-2.6.2.dist-info → novelwriter-2.7b1.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 PyQt5.QtCore import QEvent, pyqtSignal, pyqtSlot
31
- from PyQt5.QtGui import QFont, QIcon, QSyntaxHighlighter, QTextCharFormat, QTextDocument
32
- from PyQt5.QtWidgets import (
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
- NColourLabel, NFixedPage, NScrollableForm, NScrollablePage
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: # pragma: no cover
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(CONFIG.pxInt(700), CONFIG.pxInt(400))
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
- CONFIG.pxInt(options.getInt("GuiBuildSettings", "winWidth", wWin)),
94
- CONFIG.pxInt(options.getInt("GuiBuildSettings", "winHeight", hWin))
90
+ options.getInt("GuiBuildSettings", "winWidth", 750),
91
+ options.getInt("GuiBuildSettings", "winHeight", 550),
95
92
  )
96
93
 
97
94
  # Title
98
- self.titleLabel = NColourLabel(
95
+ self.titleLabel = NColorLabel(
99
96
  self.tr("Manuscript Build Settings"), self, color=SHARED.theme.helpText,
100
- scale=NColourLabel.HEADER_SCALE, indent=CONFIG.pxInt(4)
97
+ scale=NColorLabel.HEADER_SCALE, indent=4,
101
98
  )
102
99
 
103
100
  # Settings Name
@@ -145,7 +142,7 @@ class GuiBuildSettings(NToolDialog):
145
142
  self.outerBox.addLayout(self.topBox)
146
143
  self.outerBox.addLayout(self.mainBox)
147
144
  self.outerBox.addWidget(self.buttonBox)
148
- self.outerBox.setSpacing(CONFIG.pxInt(12))
145
+ self.outerBox.setSpacing(12)
149
146
 
150
147
  self.setLayout(self.outerBox)
151
148
 
@@ -231,8 +228,8 @@ class GuiBuildSettings(NToolDialog):
231
228
  """
232
229
  if self._build.changed:
233
230
  response = SHARED.question(self.tr(
234
- "Do you want to save your changes to '{0}'?".format(self._build.name)
235
- ))
231
+ "Do you want to save your changes to '{0}'?"
232
+ ).format(self._build.name))
236
233
  if response:
237
234
  self._emitBuildData()
238
235
  self._build.resetChangedState()
@@ -240,14 +237,11 @@ class GuiBuildSettings(NToolDialog):
240
237
 
241
238
  def _saveSettings(self) -> None:
242
239
  """Save the various user settings."""
243
- winWidth = CONFIG.rpxInt(self.width())
244
- winHeight = CONFIG.rpxInt(self.height())
245
240
  treeWidth, filterWidth = self.optTabSelect.mainSplitSizes()
246
-
247
241
  logger.debug("Saving State: GuiBuildSettings")
248
242
  pOptions = SHARED.project.options
249
- pOptions.setValue("GuiBuildSettings", "winWidth", winWidth)
250
- pOptions.setValue("GuiBuildSettings", "winHeight", winHeight)
243
+ pOptions.setValue("GuiBuildSettings", "winWidth", self.width())
244
+ pOptions.setValue("GuiBuildSettings", "winHeight", self.height())
251
245
  pOptions.setValue("GuiBuildSettings", "treeWidth", treeWidth)
252
246
  pOptions.setValue("GuiBuildSettings", "filterWidth", filterWidth)
253
247
  pOptions.saveSettings()
@@ -287,9 +281,9 @@ class _FilterTab(NFixedPage):
287
281
 
288
282
  self._statusFlags: dict[int, QIcon] = {
289
283
  self.F_NONE: QIcon(),
290
- self.F_FILTERED: SHARED.theme.getIcon("build_filtered"),
291
- self.F_INCLUDED: SHARED.theme.getIcon("build_included"),
292
- self.F_EXCLUDED: SHARED.theme.getIcon("build_excluded"),
284
+ self.F_FILTERED: SHARED.theme.getIcon("filter", "orange"),
285
+ self.F_INCLUDED: SHARED.theme.getIcon("pin", "blue"),
286
+ self.F_EXCLUDED: SHARED.theme.getIcon("exclude", "red"),
293
287
  }
294
288
 
295
289
  self._trIncluded = self.tr("Included in manuscript")
@@ -300,7 +294,6 @@ class _FilterTab(NFixedPage):
300
294
 
301
295
  iSz = SHARED.theme.baseIconSize
302
296
  iPx = SHARED.theme.baseIconHeight
303
- cMg = CONFIG.pxInt(6)
304
297
 
305
298
  # Tree Widget
306
299
  self.optTree = QTreeWidget(self)
@@ -311,14 +304,14 @@ class _FilterTab(NFixedPage):
311
304
  self.optTree.setIndentation(iPx)
312
305
  self.optTree.setColumnCount(3)
313
306
 
314
- treeHeader = self.optTree.header()
315
- treeHeader.setStretchLastSection(False)
316
- treeHeader.setMinimumSectionSize(iPx + cMg) # See Issue #1551
317
- treeHeader.setSectionResizeMode(self.C_NAME, QtHeaderStretch)
318
- treeHeader.setSectionResizeMode(self.C_ACTIVE, QtHeaderFixed)
319
- treeHeader.setSectionResizeMode(self.C_STATUS, QtHeaderFixed)
320
- treeHeader.resizeSection(self.C_ACTIVE, iPx + cMg)
321
- treeHeader.resizeSection(self.C_STATUS, iPx + cMg)
307
+ if header := self.optTree.header():
308
+ header.setStretchLastSection(False)
309
+ header.setMinimumSectionSize(iPx + 6) # See Issue #1551
310
+ header.setSectionResizeMode(self.C_NAME, QtHeaderStretch)
311
+ header.setSectionResizeMode(self.C_ACTIVE, QtHeaderFixed)
312
+ header.setSectionResizeMode(self.C_STATUS, QtHeaderFixed)
313
+ header.resizeSection(self.C_ACTIVE, iPx + 6)
314
+ header.resizeSection(self.C_STATUS, iPx + 6)
322
315
 
323
316
  self.optTree.setDragDropMode(QAbstractItemView.DragDropMode.NoDragDrop)
324
317
  self.optTree.setSelectionMode(QAbstractItemView.SelectionMode.ExtendedSelection)
@@ -337,7 +330,7 @@ class _FilterTab(NFixedPage):
337
330
  self.excludedButton.setIcon(self._statusFlags[self.F_EXCLUDED])
338
331
  self.excludedButton.clicked.connect(qtLambda(self._setSelectedMode, self.F_EXCLUDED))
339
332
 
340
- self.resetButton = NIconToolButton(self, iSz, "revert")
333
+ self.resetButton = NIconToolButton(self, iSz, "revert", "green")
341
334
  self.resetButton.setToolTip(self.tr("Reset to default"))
342
335
  self.resetButton.clicked.connect(qtLambda(self._setSelectedMode, self.F_FILTERED))
343
336
 
@@ -347,7 +340,7 @@ class _FilterTab(NFixedPage):
347
340
  self.modeBox.addWidget(self.includedButton)
348
341
  self.modeBox.addWidget(self.excludedButton)
349
342
  self.modeBox.addWidget(self.resetButton)
350
- self.modeBox.setSpacing(CONFIG.pxInt(4))
343
+ self.modeBox.setSpacing(4)
351
344
 
352
345
  # Filer Options
353
346
  self.filterOpt = NSwitchBox(self, iPx)
@@ -375,8 +368,8 @@ class _FilterTab(NFixedPage):
375
368
  self.mainSplit.setStretchFactor(0, 1)
376
369
  self.mainSplit.setStretchFactor(1, 0)
377
370
  self.mainSplit.setSizes([
378
- CONFIG.pxInt(pOptions.getInt("GuiBuildSettings", "treeWidth", 300)),
379
- CONFIG.pxInt(pOptions.getInt("GuiBuildSettings", "filterWidth", 300))
371
+ pOptions.getInt("GuiBuildSettings", "treeWidth", 300),
372
+ pOptions.getInt("GuiBuildSettings", "filterWidth", 300),
380
373
  ])
381
374
 
382
375
  self.setCentralWidget(self.mainSplit)
@@ -393,7 +386,7 @@ class _FilterTab(NFixedPage):
393
386
  """Extract the sizes of the main splitter."""
394
387
  sizes = self.mainSplit.sizes()
395
388
  m, n = (sizes[0], sizes[1]) if len(sizes) >= 2 else (0, 0)
396
- return CONFIG.rpxInt(m), CONFIG.rpxInt(n)
389
+ return m, n
397
390
 
398
391
  ##
399
392
  # Slots
@@ -459,19 +452,19 @@ class _FilterTab(NFixedPage):
459
452
  self.filterOpt.clear()
460
453
  self.filterOpt.addLabel(self._build.getLabel("filter"))
461
454
  self.filterOpt.addItem(
462
- SHARED.theme.getIcon("proj_scene"),
455
+ SHARED.theme.getIcon("prj_scene", "scene"),
463
456
  self._build.getLabel("filter.includeNovel"),
464
457
  "doc:filter.includeNovel",
465
458
  default=self._build.getBool("filter.includeNovel")
466
459
  )
467
460
  self.filterOpt.addItem(
468
- SHARED.theme.getIcon("proj_note"),
461
+ SHARED.theme.getIcon("prj_note", "note"),
469
462
  self._build.getLabel("filter.includeNotes"),
470
463
  "doc:filter.includeNotes",
471
464
  default=self._build.getBool("filter.includeNotes")
472
465
  )
473
466
  self.filterOpt.addItem(
474
- SHARED.theme.getIcon("unchecked"),
467
+ SHARED.theme.getIcon("unchecked", "red"),
475
468
  self._build.getLabel("filter.includeInactive"),
476
469
  "doc:filter.includeInactive",
477
470
  default=self._build.getBool("filter.includeInactive")
@@ -558,24 +551,21 @@ class _HeadingsTab(NScrollablePage):
558
551
 
559
552
  iPx = SHARED.theme.baseIconHeight
560
553
  iSz = SHARED.theme.baseIconSize
561
- sSp = CONFIG.pxInt(16)
562
- vSp = CONFIG.pxInt(12)
563
- bSp = CONFIG.pxInt(6)
564
554
  trHide = self.tr("Hide")
565
555
 
566
556
  # Format Boxes
567
557
  # ============
568
558
  self.formatBox = QGridLayout()
569
- self.formatBox.setHorizontalSpacing(bSp)
559
+ self.formatBox.setHorizontalSpacing(6)
570
560
 
571
561
  # Title Heading
572
562
  self.lblPart = QLabel(self._build.getLabel("headings.fmtPart"), self)
573
563
  self.fmtPart = QLineEdit("", self)
574
564
  self.fmtPart.setReadOnly(True)
575
- self.btnPart = NIconToolButton(self, iSz, "edit")
565
+ self.btnPart = NIconToolButton(self, iSz, "edit", "green")
576
566
  self.btnPart.clicked.connect(qtLambda(self._editHeading, self.EDIT_TITLE))
577
567
  self.hdePart = QLabel(trHide, self)
578
- self.hdePart.setIndent(bSp)
568
+ self.hdePart.setIndent(6)
579
569
  self.swtPart = NSwitch(self, height=iPx)
580
570
 
581
571
  self.formatBox.addWidget(self.lblPart, 0, 0)
@@ -588,10 +578,10 @@ class _HeadingsTab(NScrollablePage):
588
578
  self.lblChapter = QLabel(self._build.getLabel("headings.fmtChapter"), self)
589
579
  self.fmtChapter = QLineEdit("", self)
590
580
  self.fmtChapter.setReadOnly(True)
591
- self.btnChapter = NIconToolButton(self, iSz, "edit")
581
+ self.btnChapter = NIconToolButton(self, iSz, "edit", "green")
592
582
  self.btnChapter.clicked.connect(qtLambda(self._editHeading, self.EDIT_CHAPTER))
593
583
  self.hdeChapter = QLabel(trHide, self)
594
- self.hdeChapter.setIndent(bSp)
584
+ self.hdeChapter.setIndent(6)
595
585
  self.swtChapter = NSwitch(self, height=iPx)
596
586
 
597
587
  self.formatBox.addWidget(self.lblChapter, 1, 0)
@@ -604,10 +594,10 @@ class _HeadingsTab(NScrollablePage):
604
594
  self.lblUnnumbered = QLabel(self._build.getLabel("headings.fmtUnnumbered"), self)
605
595
  self.fmtUnnumbered = QLineEdit("", self)
606
596
  self.fmtUnnumbered.setReadOnly(True)
607
- self.btnUnnumbered = NIconToolButton(self, iSz, "edit")
597
+ self.btnUnnumbered = NIconToolButton(self, iSz, "edit", "green")
608
598
  self.btnUnnumbered.clicked.connect(qtLambda(self._editHeading, self.EDIT_UNNUM))
609
599
  self.hdeUnnumbered = QLabel(trHide, self)
610
- self.hdeUnnumbered.setIndent(bSp)
600
+ self.hdeUnnumbered.setIndent(6)
611
601
  self.swtUnnumbered = NSwitch(self, height=iPx)
612
602
 
613
603
  self.formatBox.addWidget(self.lblUnnumbered, 2, 0)
@@ -620,10 +610,10 @@ class _HeadingsTab(NScrollablePage):
620
610
  self.lblScene = QLabel(self._build.getLabel("headings.fmtScene"), self)
621
611
  self.fmtScene = QLineEdit("", self)
622
612
  self.fmtScene.setReadOnly(True)
623
- self.btnScene = NIconToolButton(self, iSz, "edit")
613
+ self.btnScene = NIconToolButton(self, iSz, "edit", "green")
624
614
  self.btnScene.clicked.connect(qtLambda(self._editHeading, self.EDIT_SCENE))
625
615
  self.hdeScene = QLabel(trHide, self)
626
- self.hdeScene.setIndent(bSp)
616
+ self.hdeScene.setIndent(6)
627
617
  self.swtScene = NSwitch(self, height=iPx)
628
618
 
629
619
  self.formatBox.addWidget(self.lblScene, 3, 0)
@@ -636,10 +626,10 @@ class _HeadingsTab(NScrollablePage):
636
626
  self.lblAScene = QLabel(self._build.getLabel("headings.fmtAltScene"), self)
637
627
  self.fmtAScene = QLineEdit("", self)
638
628
  self.fmtAScene.setReadOnly(True)
639
- self.btnAScene = NIconToolButton(self, iSz, "edit")
629
+ self.btnAScene = NIconToolButton(self, iSz, "edit", "green")
640
630
  self.btnAScene.clicked.connect(qtLambda(self._editHeading, self.EDIT_HSCENE))
641
631
  self.hdeAScene = QLabel(trHide, self)
642
- self.hdeAScene.setIndent(bSp)
632
+ self.hdeAScene.setIndent(6)
643
633
  self.swtAScene = NSwitch(self, height=iPx)
644
634
 
645
635
  self.formatBox.addWidget(self.lblAScene, 4, 0)
@@ -652,10 +642,10 @@ class _HeadingsTab(NScrollablePage):
652
642
  self.lblSection = QLabel(self._build.getLabel("headings.fmtSection"), self)
653
643
  self.fmtSection = QLineEdit("", self)
654
644
  self.fmtSection.setReadOnly(True)
655
- self.btnSection = NIconToolButton(self, iSz, "edit")
645
+ self.btnSection = NIconToolButton(self, iSz, "edit", "green")
656
646
  self.btnSection.clicked.connect(qtLambda(self._editHeading, self.EDIT_SECTION))
657
647
  self.hdeSection = QLabel(trHide, self)
658
- self.hdeSection.setIndent(bSp)
648
+ self.hdeSection.setIndent(6)
659
649
  self.swtSection = NSwitch(self, height=iPx)
660
650
 
661
651
  self.formatBox.addWidget(self.lblSection, 5, 0)
@@ -675,16 +665,16 @@ class _HeadingsTab(NScrollablePage):
675
665
 
676
666
  self.formSyntax = _HeadingSyntaxHighlighter(self.editTextBox.document())
677
667
 
678
- self.menuInsert = QMenu(self)
679
- self.aInsTitle = self.menuInsert.addAction(self.tr("Title"))
680
- self.aInsChNum = self.menuInsert.addAction(self.tr("Chapter Number"))
681
- self.aInsChWord = self.menuInsert.addAction(self.tr("Chapter Number (Word)"))
682
- self.aInsChRomU = self.menuInsert.addAction(self.tr("Chapter Number (Upper Case Roman)"))
683
- self.aInsChRomL = self.menuInsert.addAction(self.tr("Chapter Number (Lower Case Roman)"))
684
- self.aInsScNum = self.menuInsert.addAction(self.tr("Scene Number (In Chapter)"))
685
- self.aInsScAbs = self.menuInsert.addAction(self.tr("Scene Number (Absolute)"))
686
- self.aInsCharPOV = self.menuInsert.addAction(self.tr("Point of View Character"))
687
- self.aInsCharFocus = self.menuInsert.addAction(self.tr("Focus Character"))
668
+ self.mInsert = QMenu(self)
669
+ self.aInsTitle = qtAddAction(self.mInsert, self.tr("Title"))
670
+ self.aInsChNum = qtAddAction(self.mInsert, self.tr("Chapter Number"))
671
+ self.aInsChWord = qtAddAction(self.mInsert, self.tr("Chapter Number (Word)"))
672
+ self.aInsChRomU = qtAddAction(self.mInsert, self.tr("Chapter Number (Upper Case Roman)"))
673
+ self.aInsChRomL = qtAddAction(self.mInsert, self.tr("Chapter Number (Lower Case Roman)"))
674
+ self.aInsScNum = qtAddAction(self.mInsert, self.tr("Scene Number (In Chapter)"))
675
+ self.aInsScAbs = qtAddAction(self.mInsert, self.tr("Scene Number (Absolute)"))
676
+ self.aInsCharPOV = qtAddAction(self.mInsert, self.tr("Point of View Character"))
677
+ self.aInsCharFocus = qtAddAction(self.mInsert, self.tr("Focus Character"))
688
678
 
689
679
  self.aInsTitle.triggered.connect(qtLambda(self._insertIntoForm, nwHeadFmt.TITLE))
690
680
  self.aInsChNum.triggered.connect(qtLambda(self._insertIntoForm, nwHeadFmt.CH_NUM))
@@ -697,7 +687,7 @@ class _HeadingsTab(NScrollablePage):
697
687
  self.aInsCharFocus.triggered.connect(qtLambda(self._insertIntoForm, nwHeadFmt.CHAR_FOCUS))
698
688
 
699
689
  self.btnInsert = QPushButton(self.tr("Insert"), self)
700
- self.btnInsert.setMenu(self.menuInsert)
690
+ self.btnInsert.setMenu(self.mInsert)
701
691
 
702
692
  self.btnApply = QPushButton(self.tr("Apply"), self)
703
693
  self.btnApply.clicked.connect(self._saveFormat)
@@ -715,8 +705,8 @@ class _HeadingsTab(NScrollablePage):
715
705
  # Layout Matrix
716
706
  # =============
717
707
  self.layoutMatrix = QGridLayout()
718
- self.layoutMatrix.setVerticalSpacing(vSp)
719
- self.layoutMatrix.setHorizontalSpacing(vSp)
708
+ self.layoutMatrix.setVerticalSpacing(12)
709
+ self.layoutMatrix.setHorizontalSpacing(12)
720
710
 
721
711
  self.layoutMatrix.addWidget(QLabel(self.tr("Centre"), self), 0, 1)
722
712
  self.layoutMatrix.addWidget(QLabel(self.tr("Page Break"), self), 0, 2)
@@ -764,9 +754,9 @@ class _HeadingsTab(NScrollablePage):
764
754
 
765
755
  self.outerBox = QVBoxLayout()
766
756
  self.outerBox.addLayout(self.formatBox)
767
- self.outerBox.addSpacing(sSp)
757
+ self.outerBox.addSpacing(16)
768
758
  self.outerBox.addLayout(self.editFormBox)
769
- self.outerBox.addSpacing(sSp)
759
+ self.outerBox.addSpacing(16)
770
760
  self.outerBox.addLayout(self.layoutMatrix)
771
761
  self.outerBox.addStretch(1)
772
762
 
@@ -904,12 +894,13 @@ class _HeadingsTab(NScrollablePage):
904
894
 
905
895
  class _HeadingSyntaxHighlighter(QSyntaxHighlighter):
906
896
 
907
- def __init__(self, document: QTextDocument) -> None:
897
+ def __init__(self, document: QTextDocument | None) -> None:
908
898
  super().__init__(document)
899
+ syntax = SHARED.theme.syntaxTheme
909
900
  self._fmtSymbol = QTextCharFormat()
910
- self._fmtSymbol.setForeground(SHARED.theme.colHead)
901
+ self._fmtSymbol.setForeground(syntax.head)
911
902
  self._fmtFormat = QTextCharFormat()
912
- self._fmtFormat.setForeground(SHARED.theme.colEmph)
903
+ self._fmtFormat.setForeground(syntax.emph)
913
904
  return
914
905
 
915
906
  def highlightBlock(self, text: str) -> None:
@@ -960,11 +951,13 @@ class _FormattingTab(NScrollableForm):
960
951
  self.incBodyText = NSwitch(self, height=iPx)
961
952
  self.incSynopsis = NSwitch(self, height=iPx)
962
953
  self.incComments = NSwitch(self, height=iPx)
954
+ self.incStory = NSwitch(self, height=iPx)
963
955
  self.incKeywords = NSwitch(self, height=iPx)
964
956
 
965
957
  self.addRow(self._build.getLabel("text.includeBodyText"), self.incBodyText)
966
958
  self.addRow(self._build.getLabel("text.includeSynopsis"), self.incSynopsis)
967
959
  self.addRow(self._build.getLabel("text.includeComments"), self.incComments)
960
+ self.addRow(self._build.getLabel("text.includeStory"), self.incStory)
968
961
  self.addRow(self._build.getLabel("text.includeKeywords"), self.incKeywords)
969
962
 
970
963
  # Ignored Keywords
@@ -977,7 +970,7 @@ class _FormattingTab(NScrollableForm):
977
970
  lambda keyword=keyword: self._updateIgnoredKeywords(keyword)
978
971
  )
979
972
 
980
- self.ignoredKeywordsButton = NIconToolButton(self, iSz, "add")
973
+ self.ignoredKeywordsButton = NIconToolButton(self, iSz, "add", "green")
981
974
  self.ignoredKeywordsButton.setMenu(self.mnKeywords)
982
975
  self.addRow(
983
976
  self._build.getLabel("text.ignoredKeywords"), self.ignoredKeywords,
@@ -1063,8 +1056,8 @@ class _FormattingTab(NScrollableForm):
1063
1056
  pixB = SHARED.theme.getPixmap("margin_bottom", (iPx, iPx))
1064
1057
  pixL = SHARED.theme.getPixmap("margin_left", (iPx, iPx))
1065
1058
  pixR = SHARED.theme.getPixmap("margin_right", (iPx, iPx))
1066
- pixH = SHARED.theme.getPixmap("size_height", (iPx, iPx))
1067
- pixW = SHARED.theme.getPixmap("size_width", (iPx, iPx))
1059
+ pixH = SHARED.theme.getPixmap("fit_height", (iPx, iPx))
1060
+ pixW = SHARED.theme.getPixmap("fit_width", (iPx, iPx))
1068
1061
 
1069
1062
  # Title
1070
1063
  self.titleMarginT = NDoubleSpinBox(self)
@@ -1177,11 +1170,11 @@ class _FormattingTab(NScrollableForm):
1177
1170
  for key, name in nwLabels.PAPER_NAME.items():
1178
1171
  self.pageSize.addItem(trConst(name), key)
1179
1172
 
1180
- self.pageWidth = NDoubleSpinBox(self, max=500.0)
1173
+ self.pageWidth = NDoubleSpinBox(self, maxVal=500.0)
1181
1174
  self.pageWidth.setFixedWidth(dbW)
1182
1175
  self.pageWidth.valueChanged.connect(self._pageSizeValueChanged)
1183
1176
 
1184
- self.pageHeight = NDoubleSpinBox(self, max=500.0)
1177
+ self.pageHeight = NDoubleSpinBox(self, maxVal=500.0)
1185
1178
  self.pageHeight.setFixedWidth(dbW)
1186
1179
  self.pageHeight.valueChanged.connect(self._pageSizeValueChanged)
1187
1180
 
@@ -1222,8 +1215,8 @@ class _FormattingTab(NScrollableForm):
1222
1215
 
1223
1216
  # Header
1224
1217
  self.odtPageHeader = QLineEdit(self)
1225
- self.odtPageHeader.setMinimumWidth(CONFIG.pxInt(200))
1226
- self.btnPageHeader = NIconToolButton(self, iSz, "revert")
1218
+ self.odtPageHeader.setMinimumWidth(200)
1219
+ self.btnPageHeader = NIconToolButton(self, iSz, "revert", "green")
1227
1220
  self.btnPageHeader.clicked.connect(self._resetPageHeader)
1228
1221
  self.addRow(
1229
1222
  self._build.getLabel("doc.pageHeader"), self.odtPageHeader,
@@ -1273,6 +1266,7 @@ class _FormattingTab(NScrollableForm):
1273
1266
  self.incBodyText.setChecked(self._build.getBool("text.includeBodyText"))
1274
1267
  self.incSynopsis.setChecked(self._build.getBool("text.includeSynopsis"))
1275
1268
  self.incComments.setChecked(self._build.getBool("text.includeComments"))
1269
+ self.incStory.setChecked(self._build.getBool("text.includeStory"))
1276
1270
  self.incKeywords.setChecked(self._build.getBool("text.includeKeywords"))
1277
1271
  self.ignoredKeywords.setText(self._build.getStr("text.ignoredKeywords"))
1278
1272
  self.addNoteHead.setChecked(self._build.getBool("text.addNoteHeadings"))
@@ -1371,6 +1365,7 @@ class _FormattingTab(NScrollableForm):
1371
1365
  self._build.setValue("text.includeBodyText", self.incBodyText.isChecked())
1372
1366
  self._build.setValue("text.includeSynopsis", self.incSynopsis.isChecked())
1373
1367
  self._build.setValue("text.includeComments", self.incComments.isChecked())
1368
+ self._build.setValue("text.includeStory", self.incStory.isChecked())
1374
1369
  self._build.setValue("text.includeKeywords", self.incKeywords.isChecked())
1375
1370
  self._build.setValue("text.ignoredKeywords", self.ignoredKeywords.text())
1376
1371
  self._build.setValue("text.addNoteHeadings", self.addNoteHead.isChecked())