TxInfoDialog: improve UI

This commit is contained in:
tobtoht
2021-01-29 16:19:59 +01:00
parent 3e534fd536
commit 22abca4578
13 changed files with 165 additions and 78 deletions
+17
View File
@@ -14,6 +14,7 @@
#include "utils/config.h"
#include "utils/tails.h"
#include "utils/whonix.h"
#include "utils/ColorScheme.h"
#include "globals.h"
// Application log for current session
@@ -550,4 +551,20 @@ QString Utils::balanceFormat(quint64 balance) {
str.remove(QRegExp("\\.$"));
return str;
}
QTextCharFormat Utils::addressTextFormat(const SubaddressIndex &index) {
if (index.isPrimary()) {
QTextCharFormat rec;
rec.setBackground(QBrush(ColorScheme::YELLOW.asColor(true)));
rec.setToolTip("Wallet change/primary address");
return rec;
}
if (index.isValid()) {
QTextCharFormat rec;
rec.setBackground(QBrush(ColorScheme::GREEN.asColor(true)));
rec.setToolTip("Wallet receive address");
return rec;
}
return QTextCharFormat();
}