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.
Files changed (321) hide show
  1. novelwriter/__init__.py +84 -74
  2. novelwriter/assets/i18n/project_en_GB.json +1 -0
  3. novelwriter/assets/icons/font_awesome.icons +109 -0
  4. novelwriter/assets/icons/material_filled_bold.icons +109 -0
  5. novelwriter/assets/icons/material_filled_normal.icons +109 -0
  6. novelwriter/assets/icons/material_filled_thin.icons +109 -0
  7. novelwriter/assets/icons/material_rounded_bold.icons +109 -0
  8. novelwriter/assets/icons/material_rounded_normal.icons +109 -0
  9. novelwriter/assets/icons/material_rounded_thin.icons +109 -0
  10. novelwriter/assets/icons/remix_filled.icons +108 -0
  11. novelwriter/assets/icons/remix_outline.icons +108 -0
  12. novelwriter/assets/manual.pdf +0 -0
  13. novelwriter/assets/{manual_fr_FR.pdf → manual_fr.pdf} +0 -0
  14. novelwriter/assets/sample.zip +0 -0
  15. novelwriter/assets/syntax/cyberpunk_night.conf +1 -1
  16. novelwriter/assets/text/credits_en.htm +6 -6
  17. novelwriter/assets/themes/cyberpunk_night.conf +23 -7
  18. novelwriter/assets/themes/default_dark.conf +20 -4
  19. novelwriter/assets/themes/default_light.conf +21 -5
  20. novelwriter/assets/themes/dracula.conf +20 -4
  21. novelwriter/assets/themes/solarized_dark.conf +24 -8
  22. novelwriter/assets/themes/solarized_light.conf +22 -6
  23. novelwriter/common.py +33 -26
  24. novelwriter/config.py +118 -127
  25. novelwriter/constants.py +50 -36
  26. novelwriter/core/buildsettings.py +23 -16
  27. novelwriter/core/coretools.py +11 -7
  28. novelwriter/core/docbuild.py +19 -13
  29. novelwriter/core/document.py +2 -2
  30. novelwriter/core/index.py +142 -432
  31. novelwriter/core/indexdata.py +403 -0
  32. novelwriter/core/item.py +35 -28
  33. novelwriter/core/itemmodel.py +27 -26
  34. novelwriter/core/novelmodel.py +223 -0
  35. novelwriter/core/options.py +1 -1
  36. novelwriter/core/project.py +10 -11
  37. novelwriter/core/projectdata.py +5 -5
  38. novelwriter/core/projectxml.py +1 -1
  39. novelwriter/core/sessions.py +3 -2
  40. novelwriter/core/spellcheck.py +4 -3
  41. novelwriter/core/status.py +12 -15
  42. novelwriter/core/storage.py +1 -1
  43. novelwriter/core/tree.py +46 -8
  44. novelwriter/dialogs/about.py +19 -22
  45. novelwriter/dialogs/docmerge.py +21 -23
  46. novelwriter/dialogs/docsplit.py +20 -23
  47. novelwriter/dialogs/editlabel.py +9 -13
  48. novelwriter/dialogs/preferences.py +111 -48
  49. novelwriter/dialogs/projectsettings.py +48 -54
  50. novelwriter/dialogs/quotes.py +14 -19
  51. novelwriter/dialogs/wordlist.py +25 -30
  52. novelwriter/enum.py +8 -0
  53. novelwriter/error.py +16 -16
  54. novelwriter/extensions/configlayout.py +18 -18
  55. novelwriter/extensions/eventfilters.py +9 -5
  56. novelwriter/extensions/modified.py +34 -15
  57. novelwriter/extensions/novelselector.py +18 -5
  58. novelwriter/extensions/pagedsidebar.py +39 -49
  59. novelwriter/extensions/progressbars.py +10 -8
  60. novelwriter/extensions/statusled.py +6 -13
  61. novelwriter/extensions/switch.py +19 -30
  62. novelwriter/extensions/switchbox.py +7 -3
  63. novelwriter/extensions/versioninfo.py +4 -4
  64. novelwriter/formats/shared.py +1 -1
  65. novelwriter/formats/todocx.py +14 -10
  66. novelwriter/formats/tohtml.py +7 -5
  67. novelwriter/formats/tokenizer.py +36 -33
  68. novelwriter/formats/tomarkdown.py +6 -2
  69. novelwriter/formats/toodt.py +27 -22
  70. novelwriter/formats/toqdoc.py +19 -14
  71. novelwriter/formats/toraw.py +6 -2
  72. novelwriter/gui/doceditor.py +216 -265
  73. novelwriter/gui/dochighlight.py +46 -45
  74. novelwriter/gui/docviewer.py +102 -104
  75. novelwriter/gui/docviewerpanel.py +47 -51
  76. novelwriter/gui/editordocument.py +8 -5
  77. novelwriter/gui/itemdetails.py +11 -14
  78. novelwriter/gui/mainmenu.py +146 -145
  79. novelwriter/gui/noveltree.py +239 -405
  80. novelwriter/gui/outline.py +133 -72
  81. novelwriter/gui/projtree.py +138 -132
  82. novelwriter/gui/search.py +33 -31
  83. novelwriter/gui/sidebar.py +13 -18
  84. novelwriter/gui/statusbar.py +13 -15
  85. novelwriter/gui/theme.py +533 -430
  86. novelwriter/guimain.py +27 -29
  87. novelwriter/shared.py +32 -23
  88. novelwriter/text/comments.py +70 -0
  89. novelwriter/text/patterns.py +4 -4
  90. novelwriter/tools/dictionaries.py +20 -29
  91. novelwriter/tools/lipsum.py +16 -17
  92. novelwriter/tools/manusbuild.py +39 -42
  93. novelwriter/tools/manuscript.py +101 -114
  94. novelwriter/tools/manussettings.py +78 -83
  95. novelwriter/tools/noveldetails.py +51 -64
  96. novelwriter/tools/welcome.py +56 -75
  97. novelwriter/tools/writingstats.py +44 -57
  98. novelwriter/types.py +5 -7
  99. {novelWriter-2.6.3.dist-info → novelwriter-2.7b1.dist-info}/METADATA +6 -6
  100. novelwriter-2.7b1.dist-info/RECORD +159 -0
  101. {novelWriter-2.6.3.dist-info → novelwriter-2.7b1.dist-info}/WHEEL +1 -1
  102. novelWriter-2.6.3.dist-info/RECORD +0 -363
  103. novelwriter/assets/icons/typicons_dark/README.md +0 -29
  104. novelwriter/assets/icons/typicons_dark/icons.conf +0 -134
  105. novelwriter/assets/icons/typicons_dark/mixed_copy.svg +0 -4
  106. novelwriter/assets/icons/typicons_dark/mixed_document-chapter.svg +0 -12
  107. novelwriter/assets/icons/typicons_dark/mixed_document-new.svg +0 -6
  108. novelwriter/assets/icons/typicons_dark/mixed_document-note.svg +0 -12
  109. novelwriter/assets/icons/typicons_dark/mixed_document-scene.svg +0 -12
  110. novelwriter/assets/icons/typicons_dark/mixed_document-section.svg +0 -12
  111. novelwriter/assets/icons/typicons_dark/mixed_document-title.svg +0 -12
  112. novelwriter/assets/icons/typicons_dark/mixed_edit.svg +0 -4
  113. novelwriter/assets/icons/typicons_dark/mixed_import.svg +0 -5
  114. novelwriter/assets/icons/typicons_dark/mixed_input-checked.svg +0 -5
  115. novelwriter/assets/icons/typicons_dark/mixed_input-none.svg +0 -5
  116. novelwriter/assets/icons/typicons_dark/mixed_input-unchecked.svg +0 -5
  117. novelwriter/assets/icons/typicons_dark/mixed_margin-bottom.svg +0 -6
  118. novelwriter/assets/icons/typicons_dark/mixed_margin-left.svg +0 -6
  119. novelwriter/assets/icons/typicons_dark/mixed_margin-right.svg +0 -6
  120. novelwriter/assets/icons/typicons_dark/mixed_margin-top.svg +0 -6
  121. novelwriter/assets/icons/typicons_dark/mixed_search-replace.svg +0 -6
  122. novelwriter/assets/icons/typicons_dark/mixed_size-height.svg +0 -6
  123. novelwriter/assets/icons/typicons_dark/mixed_size-width.svg +0 -6
  124. novelwriter/assets/icons/typicons_dark/nw_deco-h0.svg +0 -4
  125. novelwriter/assets/icons/typicons_dark/nw_deco-h1.svg +0 -4
  126. novelwriter/assets/icons/typicons_dark/nw_deco-h2-narrow.svg +0 -4
  127. novelwriter/assets/icons/typicons_dark/nw_deco-h2.svg +0 -4
  128. novelwriter/assets/icons/typicons_dark/nw_deco-h3-narrow.svg +0 -4
  129. novelwriter/assets/icons/typicons_dark/nw_deco-h3.svg +0 -4
  130. novelwriter/assets/icons/typicons_dark/nw_deco-h4-narrow.svg +0 -4
  131. novelwriter/assets/icons/typicons_dark/nw_deco-h4.svg +0 -4
  132. novelwriter/assets/icons/typicons_dark/nw_deco-note.svg +0 -4
  133. novelwriter/assets/icons/typicons_dark/nw_deco-noveltree-more.svg +0 -4
  134. novelwriter/assets/icons/typicons_dark/nw_font.svg +0 -4
  135. novelwriter/assets/icons/typicons_dark/nw_panel.svg +0 -4
  136. novelwriter/assets/icons/typicons_dark/nw_quote.svg +0 -4
  137. novelwriter/assets/icons/typicons_dark/nw_search-case.svg +0 -4
  138. novelwriter/assets/icons/typicons_dark/nw_search-preserve.svg +0 -4
  139. novelwriter/assets/icons/typicons_dark/nw_search-regex.svg +0 -4
  140. novelwriter/assets/icons/typicons_dark/nw_search-word.svg +0 -4
  141. novelwriter/assets/icons/typicons_dark/nw_tb-bold-md.svg +0 -4
  142. novelwriter/assets/icons/typicons_dark/nw_tb-bold.svg +0 -6
  143. novelwriter/assets/icons/typicons_dark/nw_tb-italic-md.svg +0 -4
  144. novelwriter/assets/icons/typicons_dark/nw_tb-italic.svg +0 -6
  145. novelwriter/assets/icons/typicons_dark/nw_tb-mark.svg +0 -7
  146. novelwriter/assets/icons/typicons_dark/nw_tb-strike-md.svg +0 -4
  147. novelwriter/assets/icons/typicons_dark/nw_tb-strike.svg +0 -6
  148. novelwriter/assets/icons/typicons_dark/nw_tb-subscript.svg +0 -7
  149. novelwriter/assets/icons/typicons_dark/nw_tb-superscript.svg +0 -7
  150. novelwriter/assets/icons/typicons_dark/nw_tb-underline.svg +0 -7
  151. novelwriter/assets/icons/typicons_dark/nw_toolbar.svg +0 -5
  152. novelwriter/assets/icons/typicons_dark/typ_arrow-down-thick-grey.svg +0 -4
  153. novelwriter/assets/icons/typicons_dark/typ_arrow-forward.svg +0 -4
  154. novelwriter/assets/icons/typicons_dark/typ_arrow-maximise.svg +0 -4
  155. novelwriter/assets/icons/typicons_dark/typ_arrow-minimise.svg +0 -4
  156. novelwriter/assets/icons/typicons_dark/typ_arrow-repeat-grey.svg +0 -4
  157. novelwriter/assets/icons/typicons_dark/typ_book-grey.svg +0 -4
  158. novelwriter/assets/icons/typicons_dark/typ_book.svg +0 -6
  159. novelwriter/assets/icons/typicons_dark/typ_bookmark.svg +0 -4
  160. novelwriter/assets/icons/typicons_dark/typ_calendar.svg +0 -4
  161. novelwriter/assets/icons/typicons_dark/typ_cancel-grey.svg +0 -4
  162. novelwriter/assets/icons/typicons_dark/typ_cancel.svg +0 -4
  163. novelwriter/assets/icons/typicons_dark/typ_chart-bar-grey.svg +0 -4
  164. novelwriter/assets/icons/typicons_dark/typ_chevron-down.svg +0 -4
  165. novelwriter/assets/icons/typicons_dark/typ_chevron-left.svg +0 -4
  166. novelwriter/assets/icons/typicons_dark/typ_chevron-right.svg +0 -4
  167. novelwriter/assets/icons/typicons_dark/typ_chevron-up.svg +0 -4
  168. novelwriter/assets/icons/typicons_dark/typ_cog.svg +0 -4
  169. novelwriter/assets/icons/typicons_dark/typ_delete-full.svg +0 -4
  170. novelwriter/assets/icons/typicons_dark/typ_delete.svg +0 -4
  171. novelwriter/assets/icons/typicons_dark/typ_directions-full.svg +0 -4
  172. novelwriter/assets/icons/typicons_dark/typ_document-add.svg +0 -4
  173. novelwriter/assets/icons/typicons_dark/typ_document-text.svg +0 -8
  174. novelwriter/assets/icons/typicons_dark/typ_document.svg +0 -4
  175. novelwriter/assets/icons/typicons_dark/typ_export-grey.svg +0 -4
  176. novelwriter/assets/icons/typicons_dark/typ_export.svg +0 -4
  177. novelwriter/assets/icons/typicons_dark/typ_eye.svg +0 -4
  178. novelwriter/assets/icons/typicons_dark/typ_flag.svg +0 -4
  179. novelwriter/assets/icons/typicons_dark/typ_folder-open.svg +0 -4
  180. novelwriter/assets/icons/typicons_dark/typ_folder.svg +0 -5
  181. novelwriter/assets/icons/typicons_dark/typ_globe-grey.svg +0 -4
  182. novelwriter/assets/icons/typicons_dark/typ_key.svg +0 -4
  183. novelwriter/assets/icons/typicons_dark/typ_lightbulb-full.svg +0 -4
  184. novelwriter/assets/icons/typicons_dark/typ_location.svg +0 -4
  185. novelwriter/assets/icons/typicons_dark/typ_media-pause-grey.svg +0 -4
  186. novelwriter/assets/icons/typicons_dark/typ_media-record-outline.svg +0 -4
  187. novelwriter/assets/icons/typicons_dark/typ_media-record.svg +0 -4
  188. novelwriter/assets/icons/typicons_dark/typ_minus.svg +0 -4
  189. novelwriter/assets/icons/typicons_dark/typ_pencil.svg +0 -5
  190. novelwriter/assets/icons/typicons_dark/typ_pin-outline.svg +0 -4
  191. novelwriter/assets/icons/typicons_dark/typ_pin.svg +0 -4
  192. novelwriter/assets/icons/typicons_dark/typ_plus.svg +0 -4
  193. novelwriter/assets/icons/typicons_dark/typ_puzzle-outline.svg +0 -4
  194. novelwriter/assets/icons/typicons_dark/typ_puzzle.svg +0 -4
  195. novelwriter/assets/icons/typicons_dark/typ_refresh-flipped.svg +0 -4
  196. novelwriter/assets/icons/typicons_dark/typ_refresh.svg +0 -4
  197. novelwriter/assets/icons/typicons_dark/typ_search-grey.svg +0 -4
  198. novelwriter/assets/icons/typicons_dark/typ_search.svg +0 -4
  199. novelwriter/assets/icons/typicons_dark/typ_star.svg +0 -4
  200. novelwriter/assets/icons/typicons_dark/typ_stopwatch-grey.svg +0 -4
  201. novelwriter/assets/icons/typicons_dark/typ_th-dot-menu.svg +0 -4
  202. novelwriter/assets/icons/typicons_dark/typ_th-dot-more.svg +0 -4
  203. novelwriter/assets/icons/typicons_dark/typ_th-list-grey.svg +0 -4
  204. novelwriter/assets/icons/typicons_dark/typ_th-list.svg +0 -9
  205. novelwriter/assets/icons/typicons_dark/typ_times.svg +0 -4
  206. novelwriter/assets/icons/typicons_dark/typ_trash.svg +0 -5
  207. novelwriter/assets/icons/typicons_dark/typ_unfold-hidden.svg +0 -4
  208. novelwriter/assets/icons/typicons_dark/typ_unfold-visible.svg +0 -4
  209. novelwriter/assets/icons/typicons_dark/typ_user.svg +0 -5
  210. novelwriter/assets/icons/typicons_dark/typ_warning-full.svg +0 -4
  211. novelwriter/assets/icons/typicons_light/README.md +0 -29
  212. novelwriter/assets/icons/typicons_light/icons.conf +0 -134
  213. novelwriter/assets/icons/typicons_light/mixed_copy.svg +0 -4
  214. novelwriter/assets/icons/typicons_light/mixed_document-chapter.svg +0 -12
  215. novelwriter/assets/icons/typicons_light/mixed_document-new.svg +0 -6
  216. novelwriter/assets/icons/typicons_light/mixed_document-note.svg +0 -12
  217. novelwriter/assets/icons/typicons_light/mixed_document-scene.svg +0 -12
  218. novelwriter/assets/icons/typicons_light/mixed_document-section.svg +0 -12
  219. novelwriter/assets/icons/typicons_light/mixed_document-title.svg +0 -12
  220. novelwriter/assets/icons/typicons_light/mixed_edit.svg +0 -4
  221. novelwriter/assets/icons/typicons_light/mixed_import.svg +0 -5
  222. novelwriter/assets/icons/typicons_light/mixed_input-checked.svg +0 -5
  223. novelwriter/assets/icons/typicons_light/mixed_input-none.svg +0 -5
  224. novelwriter/assets/icons/typicons_light/mixed_input-unchecked.svg +0 -5
  225. novelwriter/assets/icons/typicons_light/mixed_margin-bottom.svg +0 -6
  226. novelwriter/assets/icons/typicons_light/mixed_margin-left.svg +0 -6
  227. novelwriter/assets/icons/typicons_light/mixed_margin-right.svg +0 -6
  228. novelwriter/assets/icons/typicons_light/mixed_margin-top.svg +0 -6
  229. novelwriter/assets/icons/typicons_light/mixed_search-replace.svg +0 -6
  230. novelwriter/assets/icons/typicons_light/mixed_size-height.svg +0 -6
  231. novelwriter/assets/icons/typicons_light/mixed_size-width.svg +0 -6
  232. novelwriter/assets/icons/typicons_light/nw_deco-h0.svg +0 -4
  233. novelwriter/assets/icons/typicons_light/nw_deco-h1.svg +0 -4
  234. novelwriter/assets/icons/typicons_light/nw_deco-h2-narrow.svg +0 -4
  235. novelwriter/assets/icons/typicons_light/nw_deco-h2.svg +0 -4
  236. novelwriter/assets/icons/typicons_light/nw_deco-h3-narrow.svg +0 -4
  237. novelwriter/assets/icons/typicons_light/nw_deco-h3.svg +0 -4
  238. novelwriter/assets/icons/typicons_light/nw_deco-h4-narrow.svg +0 -4
  239. novelwriter/assets/icons/typicons_light/nw_deco-h4.svg +0 -4
  240. novelwriter/assets/icons/typicons_light/nw_deco-note.svg +0 -4
  241. novelwriter/assets/icons/typicons_light/nw_deco-noveltree-more.svg +0 -4
  242. novelwriter/assets/icons/typicons_light/nw_font.svg +0 -4
  243. novelwriter/assets/icons/typicons_light/nw_panel.svg +0 -4
  244. novelwriter/assets/icons/typicons_light/nw_quote.svg +0 -4
  245. novelwriter/assets/icons/typicons_light/nw_search-case.svg +0 -4
  246. novelwriter/assets/icons/typicons_light/nw_search-preserve.svg +0 -4
  247. novelwriter/assets/icons/typicons_light/nw_search-regex.svg +0 -4
  248. novelwriter/assets/icons/typicons_light/nw_search-word.svg +0 -4
  249. novelwriter/assets/icons/typicons_light/nw_tb-bold-md.svg +0 -4
  250. novelwriter/assets/icons/typicons_light/nw_tb-bold.svg +0 -6
  251. novelwriter/assets/icons/typicons_light/nw_tb-italic-md.svg +0 -4
  252. novelwriter/assets/icons/typicons_light/nw_tb-italic.svg +0 -6
  253. novelwriter/assets/icons/typicons_light/nw_tb-mark.svg +0 -7
  254. novelwriter/assets/icons/typicons_light/nw_tb-strike-md.svg +0 -4
  255. novelwriter/assets/icons/typicons_light/nw_tb-strike.svg +0 -6
  256. novelwriter/assets/icons/typicons_light/nw_tb-subscript.svg +0 -7
  257. novelwriter/assets/icons/typicons_light/nw_tb-superscript.svg +0 -7
  258. novelwriter/assets/icons/typicons_light/nw_tb-underline.svg +0 -7
  259. novelwriter/assets/icons/typicons_light/nw_toolbar.svg +0 -5
  260. novelwriter/assets/icons/typicons_light/typ_arrow-down-thick-grey.svg +0 -4
  261. novelwriter/assets/icons/typicons_light/typ_arrow-forward.svg +0 -4
  262. novelwriter/assets/icons/typicons_light/typ_arrow-maximise.svg +0 -4
  263. novelwriter/assets/icons/typicons_light/typ_arrow-minimise.svg +0 -4
  264. novelwriter/assets/icons/typicons_light/typ_arrow-repeat-grey.svg +0 -4
  265. novelwriter/assets/icons/typicons_light/typ_book-grey.svg +0 -4
  266. novelwriter/assets/icons/typicons_light/typ_book.svg +0 -6
  267. novelwriter/assets/icons/typicons_light/typ_bookmark.svg +0 -4
  268. novelwriter/assets/icons/typicons_light/typ_calendar.svg +0 -4
  269. novelwriter/assets/icons/typicons_light/typ_cancel-grey.svg +0 -4
  270. novelwriter/assets/icons/typicons_light/typ_cancel.svg +0 -4
  271. novelwriter/assets/icons/typicons_light/typ_chart-bar-grey.svg +0 -4
  272. novelwriter/assets/icons/typicons_light/typ_chevron-down.svg +0 -4
  273. novelwriter/assets/icons/typicons_light/typ_chevron-left.svg +0 -4
  274. novelwriter/assets/icons/typicons_light/typ_chevron-right.svg +0 -4
  275. novelwriter/assets/icons/typicons_light/typ_chevron-up.svg +0 -4
  276. novelwriter/assets/icons/typicons_light/typ_cog.svg +0 -4
  277. novelwriter/assets/icons/typicons_light/typ_delete-full.svg +0 -4
  278. novelwriter/assets/icons/typicons_light/typ_delete.svg +0 -4
  279. novelwriter/assets/icons/typicons_light/typ_directions-full.svg +0 -4
  280. novelwriter/assets/icons/typicons_light/typ_document-add.svg +0 -4
  281. novelwriter/assets/icons/typicons_light/typ_document-text.svg +0 -5
  282. novelwriter/assets/icons/typicons_light/typ_document.svg +0 -4
  283. novelwriter/assets/icons/typicons_light/typ_export-grey.svg +0 -4
  284. novelwriter/assets/icons/typicons_light/typ_export.svg +0 -4
  285. novelwriter/assets/icons/typicons_light/typ_eye.svg +0 -4
  286. novelwriter/assets/icons/typicons_light/typ_flag.svg +0 -4
  287. novelwriter/assets/icons/typicons_light/typ_folder-open.svg +0 -4
  288. novelwriter/assets/icons/typicons_light/typ_folder.svg +0 -5
  289. novelwriter/assets/icons/typicons_light/typ_globe-grey.svg +0 -4
  290. novelwriter/assets/icons/typicons_light/typ_key.svg +0 -4
  291. novelwriter/assets/icons/typicons_light/typ_lightbulb-full.svg +0 -4
  292. novelwriter/assets/icons/typicons_light/typ_location.svg +0 -4
  293. novelwriter/assets/icons/typicons_light/typ_media-pause-grey.svg +0 -4
  294. novelwriter/assets/icons/typicons_light/typ_media-record-outline.svg +0 -4
  295. novelwriter/assets/icons/typicons_light/typ_media-record.svg +0 -4
  296. novelwriter/assets/icons/typicons_light/typ_minus.svg +0 -4
  297. novelwriter/assets/icons/typicons_light/typ_pencil.svg +0 -5
  298. novelwriter/assets/icons/typicons_light/typ_pin-outline.svg +0 -4
  299. novelwriter/assets/icons/typicons_light/typ_pin.svg +0 -4
  300. novelwriter/assets/icons/typicons_light/typ_plus.svg +0 -4
  301. novelwriter/assets/icons/typicons_light/typ_puzzle-outline.svg +0 -4
  302. novelwriter/assets/icons/typicons_light/typ_puzzle.svg +0 -4
  303. novelwriter/assets/icons/typicons_light/typ_refresh-flipped.svg +0 -4
  304. novelwriter/assets/icons/typicons_light/typ_refresh.svg +0 -4
  305. novelwriter/assets/icons/typicons_light/typ_search-grey.svg +0 -4
  306. novelwriter/assets/icons/typicons_light/typ_search.svg +0 -4
  307. novelwriter/assets/icons/typicons_light/typ_star.svg +0 -4
  308. novelwriter/assets/icons/typicons_light/typ_stopwatch-grey.svg +0 -4
  309. novelwriter/assets/icons/typicons_light/typ_th-dot-menu.svg +0 -4
  310. novelwriter/assets/icons/typicons_light/typ_th-dot-more.svg +0 -4
  311. novelwriter/assets/icons/typicons_light/typ_th-list-grey.svg +0 -4
  312. novelwriter/assets/icons/typicons_light/typ_th-list.svg +0 -9
  313. novelwriter/assets/icons/typicons_light/typ_times.svg +0 -4
  314. novelwriter/assets/icons/typicons_light/typ_trash.svg +0 -5
  315. novelwriter/assets/icons/typicons_light/typ_unfold-hidden.svg +0 -4
  316. novelwriter/assets/icons/typicons_light/typ_unfold-visible.svg +0 -4
  317. novelwriter/assets/icons/typicons_light/typ_user.svg +0 -5
  318. novelwriter/assets/icons/typicons_light/typ_warning-full.svg +0 -4
  319. {novelWriter-2.6.3.dist-info → novelwriter-2.7b1.dist-info}/entry_points.txt +0 -0
  320. {novelWriter-2.6.3.dist-info → novelwriter-2.7b1.dist-info/licenses}/LICENSE.md +0 -0
  321. {novelWriter-2.6.3.dist-info → novelwriter-2.7b1.dist-info}/top_level.txt +0 -0
@@ -26,14 +26,14 @@ from __future__ import annotations
26
26
 
27
27
  import logging
28
28
 
29
- from PyQt5.QtCore import Qt, pyqtSlot
30
- from PyQt5.QtWidgets import (
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 CONFIG, SHARED
36
- from novelwriter.extensions.configlayout import NColourLabel
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 = NColourLabel(
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(CONFIG.pxInt(400))
73
- self.listBox.setMinimumHeight(CONFIG.pxInt(180))
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(hSp)
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.clicked.connect(self._resetList)
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(vSp)
99
+ self.outerBox.addSpacing(8)
102
100
  self.outerBox.addWidget(self.listBox)
103
- self.outerBox.addSpacing(vSp)
101
+ self.outerBox.addSpacing(8)
104
102
  self.outerBox.addLayout(self.optBox)
105
- self.outerBox.addSpacing(bSp)
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
- cls = GuiDocMerge(parent, handle, items)
137
- cls.exec()
138
- data = cls.data()
139
- accepted = cls.result() == QtAccepted
140
- cls.softDelete()
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 = self._data.get("sHandle", None)
152
- itemList = self._data.get("origItems", [])
153
- self._loadContent(sHandle, itemList)
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
  ##
@@ -26,14 +26,14 @@ from __future__ import annotations
26
26
 
27
27
  import logging
28
28
 
29
- from PyQt5.QtCore import pyqtSlot
30
- from PyQt5.QtWidgets import (
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 CONFIG, SHARED
36
- from novelwriter.extensions.configlayout import NColourLabel
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 = NColourLabel(
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(CONFIG.pxInt(400))
83
- self.listBox.setMinimumHeight(CONFIG.pxInt(180))
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)"), 1)
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(vSp)
115
- self.optBox.setHorizontalSpacing(hSp)
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(vSp)
125
+ self.outerBox.addSpacing(8)
129
126
  self.outerBox.addWidget(self.listBox)
130
127
  self.outerBox.addWidget(self.splitLevel)
131
- self.outerBox.addSpacing(vSp)
128
+ self.outerBox.addSpacing(8)
132
129
  self.outerBox.addLayout(self.optBox)
133
- self.outerBox.addSpacing(bSp)
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
- cls = GuiDocSplit(parent, handle)
185
- cls.exec()
186
- data, text = cls.data()
187
- accepted = cls.result() == QtAccepted
188
- cls.softDelete()
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 = self._data.get("sHandle", None)
199
- self._loadContent(sHandle)
195
+ if sHandle := self._data.get("sHandle"):
196
+ self._loadContent(sHandle)
200
197
  return
201
198
 
202
199
  ##
@@ -25,9 +25,8 @@ from __future__ import annotations
25
25
 
26
26
  import logging
27
27
 
28
- from PyQt5.QtWidgets import QDialogButtonBox, QHBoxLayout, QLabel, QLineEdit, QVBoxLayout, QWidget
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(mVd)
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(mSp)
61
+ self.innerBox.setSpacing(12)
66
62
 
67
63
  self.outerBox = QVBoxLayout()
68
- self.outerBox.setSpacing(mSp)
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
- cls = GuiEditLabel(parent, text=text)
90
- cls.exec()
91
- label = cls.itemLabel
92
- accepted = cls.result() == QtAccepted
93
- cls.softDelete()
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 PyQt5.QtCore import Qt, pyqtSignal, pyqtSlot
30
- from PyQt5.QtGui import QCloseEvent, QKeyEvent, QKeySequence
31
- from PyQt5.QtWidgets import (
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.constants import nwUnicode
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 NColourLabel, NScrollableForm
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(CONFIG.pxInt(600), CONFIG.pxInt(500))
62
- self.resize(*CONFIG.preferencesWinSize)
62
+ self.setMinimumSize(600, 500)
63
+ self.resize(*CONFIG.prefsWinSize)
63
64
 
64
65
  # Title
65
- self.titleLabel = NColourLabel(
66
+ self.titleLabel = NColorLabel(
66
67
  self.tr("Preferences"), self, color=SHARED.theme.helpText,
67
- scale=NColourLabel.HEADER_SCALE, indent=CONFIG.pxInt(4)
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(CONFIG.pxInt(200))
74
- self.searchAction = self.searchText.addAction(
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(CONFIG.pxInt(8))
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(minWidth)
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(minWidth)
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, "default")
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("General colour theme and icons."), stretch=(3, 2)
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(fontWidth)
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(CONFIG.pxInt(200))
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, "default_light")
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(fontWidth)
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("Maximum text width in \"Normal Mode\""), self.textWidth,
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("Maximum text width in \"Focus Mode\""), self.focusWidth,
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("Hide document footer in \"Focus Mode\""), self.hideFocusFooter,
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(minWidth)
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(boxWidth)
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(boxWidth)
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 = self.guiLocale.currentData()
912
- guiTheme = self.guiTheme.currentData()
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 = self.guiSyntax.currentData()
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