diff --git a/COPYING b/COPYING
index e37cfedf6..3436ec3e4 100644
--- a/COPYING
+++ b/COPYING
@@ -240,6 +240,9 @@ Files: share/icons/application/scalable/actions/application-exit.svg
share/icons/application/scalable/status/dialog-information.svg
share/icons/application/scalable/status/dialog-warning.svg
share/icons/application/scalable/status/security-high.svg
+ share/icons/application/scalable/actions/lock-open-alert.svg
+ share/icons/application/scalable/actions/lock-open.svg
+ share/icons/application/scalable/actions/lock.svg
Copyright: 2019 Austin Andrews
License: SIL OPEN FONT LICENSE Version 1.1
Comment: Taken from Material Design icon set (https://github.com/templarian/MaterialDesign/)
diff --git a/share/icons/application/scalable/actions/lock-open-alert.svg b/share/icons/application/scalable/actions/lock-open-alert.svg
new file mode 100644
index 000000000..348537f09
--- /dev/null
+++ b/share/icons/application/scalable/actions/lock-open-alert.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/share/icons/application/scalable/actions/lock-open.svg b/share/icons/application/scalable/actions/lock-open.svg
new file mode 100644
index 000000000..ffe75da95
--- /dev/null
+++ b/share/icons/application/scalable/actions/lock-open.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/share/icons/application/scalable/actions/lock.svg b/share/icons/application/scalable/actions/lock.svg
new file mode 100644
index 000000000..5c0eb3f66
--- /dev/null
+++ b/share/icons/application/scalable/actions/lock.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/share/icons/icons.qrc b/share/icons/icons.qrc
index bb91ffe4f..40e0d5416 100644
--- a/share/icons/icons.qrc
+++ b/share/icons/icons.qrc
@@ -55,6 +55,9 @@
application/scalable/actions/hibp.svg
application/scalable/actions/lock-question.svg
application/scalable/actions/keyboard-shortcuts.svg
+ application/scalable/actions/lock.svg
+ application/scalable/actions/lock-open.svg
+ application/scalable/actions/lock-open-alert.svg
application/scalable/actions/message-close.svg
application/scalable/actions/move-down.svg
application/scalable/actions/move-up.svg
diff --git a/share/translations/keepassxc_en.ts b/share/translations/keepassxc_en.ts
index 02c6fcf59..43183f082 100644
--- a/share/translations/keepassxc_en.ts
+++ b/share/translations/keepassxc_en.ts
@@ -9060,29 +9060,14 @@ This option is deprecated, use --set-key-file instead.
-
-
- Password quality
-
-
-
-
- Password quality
-
-
-
-
- Password quality
-
-
diff --git a/src/gui/entry/EntryModel.cpp b/src/gui/entry/EntryModel.cpp
index f809e2b2a..1a5e42c17 100644
--- a/src/gui/entry/EntryModel.cpp
+++ b/src/gui/entry/EntryModel.cpp
@@ -297,24 +297,30 @@ QVariant EntryModel::data(const QModelIndex& index, int role) const
break;
case PasswordStrength:
if (!entry->password().isEmpty() && !entry->excludeFromReports()) {
+ QString iconName = "lock-question";
StateColorPalette statePalette;
QColor color = statePalette.color(StateColorPalette::Error);
switch (entry->passwordHealth()->quality()) {
case PasswordHealth::Quality::Bad:
case PasswordHealth::Quality::Poor:
+ iconName = "lock-open-alert";
color = statePalette.color(StateColorPalette::HealthCritical);
break;
case PasswordHealth::Quality::Weak:
+ iconName = "lock-open";
color = statePalette.color(StateColorPalette::HealthBad);
break;
case PasswordHealth::Quality::Good:
case PasswordHealth::Quality::Excellent:
+ iconName = "lock";
color = statePalette.color(StateColorPalette::HealthExcellent);
break;
}
- return color;
+ if (color.isValid()) {
+ return icons()->icon(iconName, true, color);
+ }
}
break;
}
diff --git a/src/gui/reports/ReportsWidgetHealthcheck.cpp b/src/gui/reports/ReportsWidgetHealthcheck.cpp
index 53cf150bc..a50fd1d7d 100644
--- a/src/gui/reports/ReportsWidgetHealthcheck.cpp
+++ b/src/gui/reports/ReportsWidgetHealthcheck.cpp
@@ -165,31 +165,32 @@ void ReportsWidgetHealthcheck::addHealthRow(QSharedPointer healt
Entry* entry,
bool excluded)
{
- QString descr, tip;
+ QString tip;
+ QString iconName = "lock-question";
QColor qualityColor;
StateColorPalette statePalette;
const auto quality = health->quality();
switch (quality) {
case PasswordHealth::Quality::Bad:
- descr = tr("Bad", "Password quality");
tip = tr("Bad — password must be changed");
+ iconName = "lock-open-alert";
qualityColor = statePalette.color(StateColorPalette::HealthCritical);
break;
-
case PasswordHealth::Quality::Poor:
- descr = tr("Poor", "Password quality");
tip = tr("Poor — password should be changed");
+ iconName = "lock-open-alert";
qualityColor = statePalette.color(StateColorPalette::HealthBad);
break;
case PasswordHealth::Quality::Weak:
- descr = tr("Weak", "Password quality");
tip = tr("Weak — consider changing the password");
+ iconName = "lock-open";
qualityColor = statePalette.color(StateColorPalette::HealthWeak);
break;
case PasswordHealth::Quality::Good:
case PasswordHealth::Quality::Excellent:
+ iconName = "lock";
qualityColor = statePalette.color(StateColorPalette::HealthOk);
break;
}
@@ -203,7 +204,7 @@ void ReportsWidgetHealthcheck::addHealthRow(QSharedPointer healt
}
auto row = QList();
- row << new QStandardItem(descr);
+ row << new QStandardItem(Icons::instance()->icon(iconName, true, qualityColor), "");
row << new QStandardItem(Icons::entryIconPixmap(entry), title);
row << new QStandardItem(Icons::groupIconPixmap(group), group->hierarchy().join("/"));
row << new QStandardItem(QString::number(health->score()));
@@ -214,7 +215,6 @@ void ReportsWidgetHealthcheck::addHealthRow(QSharedPointer healt
// invisible, it's just for screen readers etc.
QBrush brush(qualityColor);
row[0]->setForeground(brush);
- row[0]->setBackground(brush);
// Set tooltips
row[0]->setToolTip(tip);