novelWriter 2.4.3__py3-none-any.whl → 2.5b1__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 (109) hide show
  1. {novelWriter-2.4.3.dist-info → novelWriter-2.5b1.dist-info}/METADATA +4 -5
  2. {novelWriter-2.4.3.dist-info → novelWriter-2.5b1.dist-info}/RECORD +109 -101
  3. novelwriter/__init__.py +33 -39
  4. novelwriter/assets/i18n/project_en_GB.json +1 -0
  5. novelwriter/assets/icons/typicons_dark/icons.conf +2 -0
  6. novelwriter/assets/icons/typicons_dark/nw_font.svg +4 -0
  7. novelwriter/assets/icons/typicons_dark/nw_quote.svg +4 -0
  8. novelwriter/assets/icons/typicons_light/icons.conf +2 -0
  9. novelwriter/assets/icons/typicons_light/nw_font.svg +4 -0
  10. novelwriter/assets/icons/typicons_light/nw_quote.svg +4 -0
  11. novelwriter/assets/manual.pdf +0 -0
  12. novelwriter/assets/sample.zip +0 -0
  13. novelwriter/assets/syntax/cyberpunk_night.conf +5 -3
  14. novelwriter/assets/syntax/default_dark.conf +32 -18
  15. novelwriter/assets/syntax/default_light.conf +24 -10
  16. novelwriter/assets/syntax/dracula.conf +44 -0
  17. novelwriter/assets/syntax/grey_dark.conf +5 -4
  18. novelwriter/assets/syntax/grey_light.conf +5 -4
  19. novelwriter/assets/syntax/light_owl.conf +7 -6
  20. novelwriter/assets/syntax/night_owl.conf +7 -6
  21. novelwriter/assets/syntax/snazzy.conf +42 -0
  22. novelwriter/assets/syntax/solarized_dark.conf +4 -3
  23. novelwriter/assets/syntax/solarized_light.conf +4 -3
  24. novelwriter/assets/syntax/tango.conf +27 -11
  25. novelwriter/assets/syntax/tomorrow.conf +6 -5
  26. novelwriter/assets/syntax/tomorrow_night.conf +7 -6
  27. novelwriter/assets/syntax/tomorrow_night_blue.conf +6 -5
  28. novelwriter/assets/syntax/tomorrow_night_bright.conf +6 -5
  29. novelwriter/assets/syntax/tomorrow_night_eighties.conf +6 -5
  30. novelwriter/assets/text/credits_en.htm +4 -1
  31. novelwriter/assets/themes/cyberpunk_night.conf +2 -0
  32. novelwriter/assets/themes/default_dark.conf +1 -0
  33. novelwriter/assets/themes/default_light.conf +1 -0
  34. novelwriter/assets/themes/dracula.conf +47 -0
  35. novelwriter/assets/themes/solarized_dark.conf +1 -0
  36. novelwriter/assets/themes/solarized_light.conf +1 -0
  37. novelwriter/common.py +31 -9
  38. novelwriter/config.py +118 -84
  39. novelwriter/constants.py +40 -26
  40. novelwriter/core/buildsettings.py +63 -66
  41. novelwriter/core/coretools.py +2 -22
  42. novelwriter/core/docbuild.py +51 -40
  43. novelwriter/core/document.py +3 -5
  44. novelwriter/core/index.py +115 -45
  45. novelwriter/core/item.py +8 -19
  46. novelwriter/core/options.py +2 -4
  47. novelwriter/core/project.py +23 -57
  48. novelwriter/core/projectdata.py +1 -3
  49. novelwriter/core/projectxml.py +12 -15
  50. novelwriter/core/sessions.py +3 -5
  51. novelwriter/core/spellcheck.py +4 -9
  52. novelwriter/core/status.py +211 -164
  53. novelwriter/core/storage.py +0 -8
  54. novelwriter/core/tohtml.py +94 -100
  55. novelwriter/core/tokenizer.py +199 -112
  56. novelwriter/core/{tomd.py → tomarkdown.py} +97 -78
  57. novelwriter/core/toodt.py +212 -148
  58. novelwriter/core/toqdoc.py +403 -0
  59. novelwriter/core/tree.py +5 -7
  60. novelwriter/dialogs/about.py +3 -5
  61. novelwriter/dialogs/docmerge.py +1 -3
  62. novelwriter/dialogs/docsplit.py +1 -3
  63. novelwriter/dialogs/editlabel.py +0 -2
  64. novelwriter/dialogs/preferences.py +111 -88
  65. novelwriter/dialogs/projectsettings.py +216 -180
  66. novelwriter/dialogs/quotes.py +3 -4
  67. novelwriter/dialogs/wordlist.py +3 -9
  68. novelwriter/enum.py +31 -25
  69. novelwriter/error.py +8 -15
  70. novelwriter/extensions/circularprogress.py +5 -6
  71. novelwriter/extensions/configlayout.py +18 -18
  72. novelwriter/extensions/eventfilters.py +1 -5
  73. novelwriter/extensions/modified.py +50 -13
  74. novelwriter/extensions/novelselector.py +1 -3
  75. novelwriter/extensions/pagedsidebar.py +9 -12
  76. novelwriter/extensions/simpleprogress.py +1 -3
  77. novelwriter/extensions/statusled.py +1 -3
  78. novelwriter/extensions/switch.py +4 -6
  79. novelwriter/extensions/switchbox.py +7 -6
  80. novelwriter/extensions/versioninfo.py +3 -9
  81. novelwriter/gui/doceditor.py +98 -126
  82. novelwriter/gui/dochighlight.py +237 -183
  83. novelwriter/gui/docviewer.py +46 -94
  84. novelwriter/gui/docviewerpanel.py +3 -10
  85. novelwriter/gui/editordocument.py +1 -3
  86. novelwriter/gui/itemdetails.py +7 -11
  87. novelwriter/gui/mainmenu.py +11 -7
  88. novelwriter/gui/noveltree.py +11 -24
  89. novelwriter/gui/outline.py +11 -23
  90. novelwriter/gui/projtree.py +26 -43
  91. novelwriter/gui/search.py +1 -3
  92. novelwriter/gui/sidebar.py +2 -6
  93. novelwriter/gui/statusbar.py +6 -10
  94. novelwriter/gui/theme.py +23 -48
  95. novelwriter/guimain.py +50 -71
  96. novelwriter/shared.py +30 -15
  97. novelwriter/tools/dictionaries.py +8 -12
  98. novelwriter/tools/lipsum.py +2 -4
  99. novelwriter/tools/manusbuild.py +1 -3
  100. novelwriter/tools/manuscript.py +66 -145
  101. novelwriter/tools/manussettings.py +67 -73
  102. novelwriter/tools/noveldetails.py +6 -11
  103. novelwriter/tools/welcome.py +2 -16
  104. novelwriter/tools/writingstats.py +6 -9
  105. novelwriter/types.py +45 -3
  106. {novelWriter-2.4.3.dist-info → novelWriter-2.5b1.dist-info}/LICENSE.md +0 -0
  107. {novelWriter-2.4.3.dist-info → novelWriter-2.5b1.dist-info}/WHEEL +0 -0
  108. {novelWriter-2.4.3.dist-info → novelWriter-2.5b1.dist-info}/entry_points.txt +0 -0
  109. {novelWriter-2.4.3.dist-info → novelWriter-2.5b1.dist-info}/top_level.txt +0 -0
@@ -23,37 +23,34 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
23
23
  """
24
24
  from __future__ import annotations
25
25
 
26
- import json
27
26
  import logging
28
27
 
29
- from datetime import datetime
30
28
  from time import time
31
29
  from typing import TYPE_CHECKING
32
30
 
33
31
  from PyQt5.QtCore import Qt, QTimer, QUrl, pyqtSignal, pyqtSlot
34
- from PyQt5.QtGui import QCloseEvent, QColor, QCursor, QPalette, QResizeEvent
32
+ from PyQt5.QtGui import QCloseEvent, QColor, QCursor, QFont, QPalette, QResizeEvent, QTextDocument
35
33
  from PyQt5.QtPrintSupport import QPrinter, QPrintPreviewDialog
36
34
  from PyQt5.QtWidgets import (
37
- QAbstractItemView, QApplication, QDialog, QFormLayout, QGridLayout,
38
- QHBoxLayout, QLabel, QListWidget, QListWidgetItem, QPushButton,
39
- QSizePolicy, QSplitter, QStackedWidget, QTabWidget, QTextBrowser,
40
- QTreeWidget, QTreeWidgetItem, QVBoxLayout, QWidget
35
+ QAbstractItemView, QApplication, QFormLayout, QGridLayout, QHBoxLayout,
36
+ QLabel, QListWidget, QListWidgetItem, QPushButton, QSplitter,
37
+ QStackedWidget, QTabWidget, QTextBrowser, QTreeWidget, QTreeWidgetItem,
38
+ QVBoxLayout, QWidget
41
39
  )
42
40
 
43
41
  from novelwriter import CONFIG, SHARED
44
- from novelwriter.common import checkInt, fuzzyTime
42
+ from novelwriter.common import fuzzyTime
45
43
  from novelwriter.core.buildsettings import BuildCollection, BuildSettings
46
44
  from novelwriter.core.docbuild import NWBuildDocument
47
- from novelwriter.core.tohtml import ToHtml
48
45
  from novelwriter.core.tokenizer import HeadingFormatter
49
- from novelwriter.error import logException
46
+ from novelwriter.core.toqdoc import TextDocumentTheme, ToQTextDocument
50
47
  from novelwriter.extensions.circularprogress import NProgressCircle
51
- from novelwriter.extensions.modified import NIconToggleButton, NIconToolButton
48
+ from novelwriter.extensions.modified import NIconToggleButton, NIconToolButton, NToolDialog
52
49
  from novelwriter.gui.theme import STYLES_FLAT_TABS, STYLES_MIN_TOOLBUTTON
53
50
  from novelwriter.tools.manusbuild import GuiManuscriptBuild
54
51
  from novelwriter.tools.manussettings import GuiBuildSettings
55
52
  from novelwriter.types import (
56
- QtAlignAbsolute, QtAlignCenter, QtAlignJustify, QtAlignRight, QtAlignTop,
53
+ QtAlignCenter, QtAlignRight, QtAlignTop, QtSizeExpanding, QtSizeIgnored,
57
54
  QtUserRole
58
55
  )
59
56
 
@@ -63,7 +60,7 @@ if TYPE_CHECKING: # pragma: no cover
63
60
  logger = logging.getLogger(__name__)
64
61
 
65
62
 
66
- class GuiManuscript(QDialog):
63
+ class GuiManuscript(NToolDialog):
67
64
  """GUI Tools: Manuscript Tool
68
65
 
69
66
  The dialog displays all the users build definitions, a preview panel
@@ -73,15 +70,11 @@ class GuiManuscript(QDialog):
73
70
 
74
71
  D_KEY = QtUserRole
75
72
 
76
- def __init__(self, mainGui: GuiMain) -> None:
77
- super().__init__(parent=mainGui)
73
+ def __init__(self, parent: GuiMain) -> None:
74
+ super().__init__(parent=parent)
78
75
 
79
76
  logger.debug("Create: GuiManuscript")
80
77
  self.setObjectName("GuiManuscript")
81
- if CONFIG.osDarwin:
82
- self.setWindowFlag(Qt.WindowType.Tool)
83
-
84
- self.mainGui = mainGui
85
78
 
86
79
  self._builds = BuildCollection(SHARED.project)
87
80
  self._buildMap: dict[str, QListWidgetItem] = {}
@@ -253,20 +246,7 @@ class GuiManuscript(QDialog):
253
246
  self._updateBuildsList()
254
247
  if selected in self._buildMap:
255
248
  self.buildList.setCurrentItem(self._buildMap[selected])
256
-
257
- logger.debug("Loading build cache")
258
- cache = CONFIG.dataPath("cache") / f"build_{SHARED.project.data.uuid}.json"
259
- if cache.is_file():
260
- try:
261
- with open(cache, mode="r", encoding="utf-8") as fObj:
262
- data = json.load(fObj)
263
- build = self._builds.getBuild(data.get("uuid", ""))
264
- if isinstance(build, BuildSettings):
265
- self._updatePreview(data, build)
266
- except Exception:
267
- logger.error("Failed to load build cache")
268
- logException()
269
- return
249
+ QTimer.singleShot(200, self._generatePreview)
270
250
 
271
251
  return
272
252
 
@@ -280,7 +260,7 @@ class GuiManuscript(QDialog):
280
260
  dialog open.
281
261
  """
282
262
  self._saveSettings()
283
- for obj in self.mainGui.children():
263
+ for obj in SHARED.mainGui.children():
284
264
  # Make sure we don't have any settings windows open
285
265
  if isinstance(obj, GuiBuildSettings) and obj.isVisible():
286
266
  obj.close()
@@ -343,39 +323,40 @@ class GuiManuscript(QDialog):
343
323
  return
344
324
 
345
325
  # Make sure editor content is saved before we start
346
- SHARED.mainGui.saveDocument()
326
+ SHARED.saveDocument()
347
327
 
348
328
  docBuild = NWBuildDocument(SHARED.project, build)
349
- docBuild.setPreviewMode(True)
350
329
  docBuild.queueAll()
351
330
 
331
+ theme = TextDocumentTheme()
332
+ theme.text = QColor(0, 0, 0)
333
+ theme.highlight = QColor(255, 255, 166)
334
+ theme.head = QColor(66, 113, 174)
335
+ theme.comment = QColor(100, 100, 100)
336
+ theme.note = QColor(129, 55, 9)
337
+ theme.code = QColor(66, 113, 174)
338
+ theme.modifier = QColor(129, 55, 9)
339
+ theme.keyword = QColor(245, 135, 31)
340
+ theme.tag = QColor(66, 113, 174)
341
+ theme.optional = QColor(66, 113, 174)
342
+
352
343
  self.docPreview.beginNewBuild(len(docBuild))
353
- for step, _ in docBuild.iterBuildHTML(None):
344
+ for step, _ in docBuild.iterBuildPreview(theme):
354
345
  self.docPreview.buildStep(step + 1)
355
346
  QApplication.processEvents()
356
347
 
357
348
  buildObj = docBuild.lastBuild
358
- assert isinstance(buildObj, ToHtml)
359
- result = {
360
- "uuid": build.buildID,
361
- "time": int(time()),
362
- "stats": buildObj.textStats,
363
- "outline": buildObj.textOutline,
364
- "styles": buildObj.getStyleSheet(),
365
- "html": buildObj.fullHTML,
366
- }
367
-
368
- self._updatePreview(result, build)
369
-
370
- logger.debug("Saving build cache")
371
- cache = CONFIG.dataPath("cache") / f"build_{SHARED.project.data.uuid}.json"
372
- try:
373
- with open(cache, mode="w+", encoding="utf-8") as outFile:
374
- outFile.write(json.dumps(result, indent=2))
375
- except Exception:
376
- logger.error("Failed to save build cache")
377
- logException()
378
- return
349
+ assert isinstance(buildObj, ToQTextDocument)
350
+
351
+ font = QFont()
352
+ font.fromString(build.getStr("format.textFont"))
353
+
354
+ self.docPreview.setTextFont(font)
355
+ self.docPreview.setContent(buildObj.document)
356
+ self.docPreview.setBuildName(build.name)
357
+
358
+ self.docStats.updateStats(buildObj.textStats)
359
+ self.buildOutline.updateOutline(buildObj.textOutline)
379
360
 
380
361
  return
381
362
 
@@ -383,8 +364,8 @@ class GuiManuscript(QDialog):
383
364
  def _buildManuscript(self) -> None:
384
365
  """Open the build dialog and build the manuscript."""
385
366
  if build := self._getSelectedBuild():
386
- dlgBuild = GuiManuscriptBuild(self, build)
387
- dlgBuild.exec()
367
+ dialog = GuiManuscriptBuild(self, build)
368
+ dialog.exec()
388
369
 
389
370
  # After the build is done, save build settings changes
390
371
  if build.changed:
@@ -404,21 +385,6 @@ class GuiManuscript(QDialog):
404
385
  # Internal Functions
405
386
  ##
406
387
 
407
- def _updatePreview(self, data: dict, build: BuildSettings) -> None:
408
- """Update the preview widget and set relevant values."""
409
- self.docPreview.setContent(data)
410
- self.docPreview.setBuildName(build.name)
411
- self.docPreview.setTextFont(
412
- build.getStr("format.textFont"),
413
- build.getInt("format.textSize")
414
- )
415
- self.docPreview.setJustify(
416
- build.getBool("format.justifyText")
417
- )
418
- self.docStats.updateStats(data.get("stats", {}))
419
- self.buildOutline.updateOutline(data.get("outline", {}))
420
- return
421
-
422
388
  def _getSelectedBuild(self) -> BuildSettings | None:
423
389
  """Get the currently selected build. If none are selected,
424
390
  automatically select the first one.
@@ -473,17 +439,13 @@ class GuiManuscript(QDialog):
473
439
  def _openSettingsDialog(self, build: BuildSettings) -> None:
474
440
  """Open the build settings dialog."""
475
441
  if dialog := self._findSettingsDialog(build.buildID):
476
- dialog.show()
477
- dialog.raise_()
442
+ dialog.activateDialog()
478
443
  return
479
444
 
480
- dlgSettings = GuiBuildSettings(self.mainGui, build)
481
- dlgSettings.setModal(False)
482
- dlgSettings.show()
483
- dlgSettings.raise_()
484
- QApplication.processEvents()
485
- dlgSettings.loadContent()
486
- dlgSettings.newSettingsReady.connect(self._processNewSettings)
445
+ dialog = GuiBuildSettings(SHARED.mainGui, build)
446
+ dialog.activateDialog()
447
+ dialog.loadContent()
448
+ dialog.newSettingsReady.connect(self._processNewSettings)
487
449
 
488
450
  return
489
451
 
@@ -518,8 +480,6 @@ class GuiManuscript(QDialog):
518
480
  return obj
519
481
  return None
520
482
 
521
- # END Class GuiManuscript
522
-
523
483
 
524
484
  class _DetailsWidget(QWidget):
525
485
 
@@ -661,8 +621,6 @@ class _DetailsWidget(QWidget):
661
621
 
662
622
  return
663
623
 
664
- # END Class _DetailsWidget
665
-
666
624
 
667
625
  class _OutlineWidget(QWidget):
668
626
 
@@ -742,8 +700,6 @@ class _OutlineWidget(QWidget):
742
700
  self.outlineEntryClicked.emit(str(item.data(0, self.D_LINE)))
743
701
  return
744
702
 
745
- # END Class _OutlineWidget
746
-
747
703
 
748
704
  class _PreviewWidget(QTextBrowser):
749
705
 
@@ -801,7 +757,7 @@ class _PreviewWidget(QTextBrowser):
801
757
  self._updateDocMargins()
802
758
  self._updateBuildAge()
803
759
 
804
- self.setTextFont(CONFIG.textFont, CONFIG.textSize)
760
+ self.setTextFont(CONFIG.textFont)
805
761
 
806
762
  # Age Timer
807
763
  self.ageTimer = QTimer(self)
@@ -821,28 +777,14 @@ class _PreviewWidget(QTextBrowser):
821
777
  self._updateBuildAge()
822
778
  return
823
779
 
824
- def setJustify(self, state: bool) -> None:
825
- """Enable/disable the justify text option."""
826
- pOptions = self.document().defaultTextOption()
827
- if state:
828
- pOptions.setAlignment(QtAlignJustify)
829
- else:
830
- pOptions.setAlignment(QtAlignAbsolute)
831
- self.document().setDefaultTextOption(pOptions)
832
- return
833
-
834
- def setTextFont(self, family: str, size: int) -> None:
780
+ def setTextFont(self, font: QFont) -> None:
835
781
  """Set the text font properties and then reset for sub-widgets.
836
782
  This needs special attention since there appears to be a bug in
837
783
  Qt 5.15.3. See issues #1862 and #1875.
838
784
  """
839
- if family and size > 4:
840
- font = self.font()
841
- font.setFamily(family)
842
- font.setPointSize(size)
843
- self.setFont(font)
844
- self.buildProgress.setFont(SHARED.theme.guiFont)
845
- self.ageLabel.setFont(SHARED.theme.guiFontSmall)
785
+ self.setFont(font)
786
+ self.buildProgress.setFont(SHARED.theme.guiFont)
787
+ self.ageLabel.setFont(SHARED.theme.guiFontSmall)
846
788
  return
847
789
 
848
790
  ##
@@ -866,31 +808,19 @@ class _PreviewWidget(QTextBrowser):
866
808
  QApplication.processEvents()
867
809
  return
868
810
 
869
- def setContent(self, data: dict) -> None:
811
+ def setContent(self, document: QTextDocument) -> None:
870
812
  """Set the content of the preview widget."""
871
813
  QApplication.setOverrideCursor(QCursor(Qt.CursorShape.WaitCursor))
872
814
 
873
815
  self.buildProgress.setCentreText(self.tr("Processing ..."))
874
816
  QApplication.processEvents()
875
817
 
876
- styles = "\n".join(data.get("styles", []))
877
- self.document().setDefaultStyleSheet(styles)
878
-
879
- html = "".join(data.get("html", []))
880
- html = html.replace("\t", "!!tab!!")
881
- self.setHtml(html)
882
- QApplication.processEvents()
883
- while self.find("!!tab!!"):
884
- cursor = self.textCursor()
885
- cursor.insertText("\t")
818
+ document.setDocumentMargin(CONFIG.getTextMargin())
819
+ self.setDocument(document)
886
820
 
887
- self._docTime = checkInt(data.get("time"), 0)
821
+ self._docTime = int(time())
888
822
  self._updateBuildAge()
889
823
 
890
- # Since we change the content while it may still be rendering, we mark
891
- # the document as dirty again to make sure it's re-rendered properly.
892
- self.document().markContentsDirty(0, self.document().characterCount())
893
-
894
824
  self.buildProgress.setCentreText(self.tr("Done"))
895
825
  QApplication.restoreOverrideCursor()
896
826
  QApplication.processEvents()
@@ -935,17 +865,14 @@ class _PreviewWidget(QTextBrowser):
935
865
  @pyqtSlot()
936
866
  def _updateBuildAge(self) -> None:
937
867
  """Update the build time and the fuzzy age."""
938
- if self._docTime > 0:
939
- strBuildTime = "%s (%s)" % (
940
- CONFIG.localDateTime(datetime.fromtimestamp(self._docTime)),
941
- fuzzyTime(int(time()) - self._docTime)
942
- )
868
+ if self._buildName and self._docTime > 0:
869
+ self.ageLabel.setText("<b>{0}</b><br>{1}: {2}".format(
870
+ self._buildName,
871
+ self.tr("Built"),
872
+ fuzzyTime(int(time()) - self._docTime),
873
+ ))
943
874
  else:
944
- strBuildTime = self.tr("Unknown")
945
- text = "{0}: {1}".format(self.tr("Built"), strBuildTime)
946
- if self._buildName:
947
- text = "<b>{0}</b><br>{1}".format(self._buildName, text)
948
- self.ageLabel.setText(text)
875
+ self.ageLabel.setText("<b>{0}</b>".format(self.tr("No Preview")))
949
876
  return
950
877
 
951
878
  @pyqtSlot()
@@ -975,8 +902,6 @@ class _PreviewWidget(QTextBrowser):
975
902
  self.buildProgress.move((vW-pS)//2, (vH-pS)//2)
976
903
  return
977
904
 
978
- # END Class _PreviewWidget
979
-
980
905
 
981
906
  class _StatsWidget(QWidget):
982
907
 
@@ -1041,16 +966,14 @@ class _StatsWidget(QWidget):
1041
966
  @pyqtSlot(bool)
1042
967
  def _toggleView(self, state: bool) -> None:
1043
968
  """Toggle minimal or maximal view."""
1044
- ignored = QSizePolicy.Policy.Ignored
1045
- expanded = QSizePolicy.Policy.Expanding
1046
969
  if state:
1047
970
  self.mainStack.setCurrentWidget(self.maxWidget)
1048
- self.maxWidget.setSizePolicy(expanded, expanded)
1049
- self.minWidget.setSizePolicy(ignored, ignored)
971
+ self.maxWidget.setSizePolicy(QtSizeExpanding, QtSizeExpanding)
972
+ self.minWidget.setSizePolicy(QtSizeIgnored, QtSizeIgnored)
1050
973
  else:
1051
974
  self.mainStack.setCurrentWidget(self.minWidget)
1052
- self.maxWidget.setSizePolicy(ignored, ignored)
1053
- self.minWidget.setSizePolicy(expanded, expanded)
975
+ self.maxWidget.setSizePolicy(QtSizeIgnored, QtSizeIgnored)
976
+ self.minWidget.setSizePolicy(QtSizeExpanding, QtSizeExpanding)
1054
977
  self.maxWidget.adjustSize()
1055
978
  self.minWidget.adjustSize()
1056
979
  self.mainStack.adjustSize()
@@ -1152,5 +1075,3 @@ class _StatsWidget(QWidget):
1152
1075
  self.maxWidget.setLayout(self.maxLayout)
1153
1076
 
1154
1077
  return
1155
-
1156
- # END Class _StatsWidget