colored history lines to indicate the version state

This commit is contained in:
Vinicius Moreira
2019-07-01 16:57:20 -03:00
parent 060acaea08
commit cf39d8823b
4 changed files with 13 additions and 5 deletions

View File

@@ -37,8 +37,10 @@ class HistoryDialog(QDialog):
item.setFlags(Qt.ItemIsSelectable | Qt.ItemIsEnabled)
if current_app_commit:
item.setBackground(Qt.darkYellow)
item.setToolTip(locale_keys['popup.history.selected.tooltip'])
item.setBackground(Qt.yellow if row != 0 else Qt.green)
tip = '{}. {}.'.format(locale_keys['popup.history.selected.tooltip'], locale_keys['version.{}'.format('updated'if row == 0 else 'outdated')].capitalize())
item.setToolTip(tip)
table_history.setItem(row, col, item)