TxConfDialog: Justify amounts

This commit is contained in:
tobtoht
2020-12-16 17:31:25 +01:00
parent 6c8255b12b
commit f75d1f546b
3 changed files with 25 additions and 7 deletions
+11
View File
@@ -576,4 +576,15 @@ QString Utils::amountToCurrencyString(double amount, const QString &currencyCode
return locale.toCurrencyString(amount, "$");
return locale.toCurrencyString(amount);
}
int Utils::maxLength(const QVector<QString> &array) {
int maxLength = 0;
for (const auto &str: array) {
auto length = str.length();
if (length > maxLength) {
maxLength = length;
}
}
return maxLength;
}