1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-01-22 14:41:39 +00:00

Add a preference option to disable bold font on reference row.

This commit is contained in:
glubsy
2020-04-27 01:36:27 +02:00
parent c4a6958ef0
commit dab762f05e
3 changed files with 10 additions and 2 deletions

View File

@@ -25,6 +25,7 @@ class ResultsModel(Table):
view.verticalHeader().setDefaultSectionSize(fm.height() + 2)
app.willSavePrefs.connect(self.appWillSavePrefs)
self.prefs = app.prefs
def _getData(self, row, column, role):
if column.name == "marked":
@@ -40,9 +41,9 @@ class ResultsModel(Table):
elif row.is_cell_delta(column.name):
return QBrush(QColor(255, 142, 40)) # orange
elif role == Qt.FontRole:
isBold = row.isref
font = QFont(self.view.font())
font.setBold(isBold)
if self.prefs.reference_bold_font:
font.setBold(row.isref)
return font
elif role == Qt.EditRole:
if column.name == "name":