GUI and code tweaks and fixes (#852)
* Improve format menu header descriptions * Ensure that item status is parsed after item class from XML * Fix column alignment in ToC.txt file * Rename test variable and fix outdated docstring * Fix ToC.txt underline * Rename the Layout label on the item details panel * Add option to emphasise H1 and H2 labels in the project tree * Rename the main column of the novel tree to match project tree * Use the same document icons in the outline as the project tree * Move project tree settings to Project section of config file
This commit is contained in:
committed by
GitHub
parent
f7c768bb91
commit
a9368904e5
+13
-1
@@ -86,7 +86,7 @@ class GuiProjectTree(QTreeWidget):
|
||||
self.setIndentation(iPx)
|
||||
self.setColumnCount(4)
|
||||
self.setHeaderLabels([
|
||||
self.tr("Label"), self.tr("Words"), "",
|
||||
self.tr("Project Tree"), self.tr("Words"), "",
|
||||
self.tr("Status") if self.mainConf.fullStatus else ""
|
||||
])
|
||||
|
||||
@@ -636,6 +636,13 @@ class GuiProjectTree(QTreeWidget):
|
||||
else:
|
||||
trItem.setToolTip(self.C_STATUS, nwItem.itemStatus)
|
||||
|
||||
if self.mainConf.emphLabels and nwItem.itemLayout == nwItemLayout.DOCUMENT:
|
||||
if hLevel in ("H1", "H2"):
|
||||
trFont = trItem.font(self.C_NAME)
|
||||
trFont.setBold(True)
|
||||
trFont.setUnderline(True)
|
||||
trItem.setFont(self.C_NAME, trFont)
|
||||
|
||||
return
|
||||
|
||||
def propagateCount(self, tHandle, theCount, nDepth=0):
|
||||
@@ -695,6 +702,11 @@ class GuiProjectTree(QTreeWidget):
|
||||
logger.debug("Building the project tree ...")
|
||||
self.clearTree()
|
||||
|
||||
self.setHeaderLabels([
|
||||
self.tr("Project Tree"), self.tr("Words"), "",
|
||||
self.tr("Status") if self.mainConf.fullStatus else ""
|
||||
])
|
||||
|
||||
iCount = 0
|
||||
for nwItem in self.theProject.getProjectItems():
|
||||
iCount += 1
|
||||
|
||||
Reference in New Issue
Block a user