qt: Use fixed-point arithmetic in amount spinbox

Fixes various issues and cleans up code

- Fixes issue #4500: Amount widget +/- has floating point rounding artifacts
- Amount box can now be emptied again, without clearing to 0

Also aligns the amount to the right, as in other places.
This commit is contained in:
Wladimir J. van der Laan
2014-07-18 16:31:13 +02:00
parent d5a3fd10e5
commit 91cce1732b
6 changed files with 187 additions and 113 deletions

View File

@@ -4,6 +4,8 @@
#include "bitcoinunits.h"
#include "core.h"
#include <QStringList>
BitcoinUnits::BitcoinUnits(QObject *parent):
@@ -250,3 +252,8 @@ QVariant BitcoinUnits::data(const QModelIndex &index, int role) const
}
return QVariant();
}
qint64 BitcoinUnits::maxMoney()
{
return MAX_MONEY;
}