Visually improve the list of strings
offlate/window.py
57 | 57 | cont = True | |
58 | 58 | if not cont: | |
59 | 59 | continue | |
60 | - | item = QTreeWidgetItem([entry.msgids[0], entry.msgstrs[0]]) | |
60 | + | item = QTreeWidgetItem([entry.msgids[0].replace('\n', ' '), | |
61 | + | entry.msgstrs[0].replace('\n', ' ')]) | |
62 | + | if entry.isFuzzy(): | |
63 | + | item.setForeground(1, QBrush(QColor(255, 127, 80))) | |
64 | + | item.setFont(0, QFont("sans-serif", 10)) | |
65 | + | item.setFont(1, QFont("sans-serif", 10)) | |
66 | + | item.setSizeHint(0, QSize(-1, 22)) | |
61 | 67 | item.setData(0, Qt.UserRole, entry) | |
62 | 68 | items.append(item) | |
63 | 69 | self.treeWidget.insertTopLevelItems(0, items) | |
… | |||
155 | 161 | data.update(i, self.msgstr.widget(i).toPlainText()) | |
156 | 162 | i=i+1 | |
157 | 163 | item.setText(1, data.get(0)) | |
164 | + | item.setForeground(1, QBrush()) | |
158 | 165 | ||
159 | 166 | def save(self): | |
160 | 167 | self.project.save() |