Change project details to use decoration graphics rather than icons, and delete the no longer used header icons

This commit is contained in:
Veronica Berglyd Olsen
2022-10-14 10:20:30 +02:00
parent 91e6b0671e
commit 07a5def0a9
13 changed files with 2 additions and 445 deletions
+2 -1
View File
@@ -512,10 +512,11 @@ class GuiProjectDetailsContents(QWidget):
progPage = f"{cPage:n}"
progText = f"{pgProg:.1f}{nwUnicode.U_THSP}%"
hDec = self.mainTheme.getHeaderDecoration(tLevel)
if tTitle.strip() == "":
tTitle = self.tr("Untitled")
newItem.setIcon(self.C_TITLE, self.mainTheme.getIcon("doc_h%d" % tLevel))
newItem.setData(self.C_TITLE, Qt.DecorationRole, hDec)
newItem.setText(self.C_TITLE, tTitle)
newItem.setText(self.C_WORDS, f"{wCount:n}")
newItem.setText(self.C_PAGES, f"{pCount:n}")