aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoinamountfield.cpp
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2013-10-15 15:26:22 +0200
committerPhilip Kaufmann <phil.kaufmann@t-online.de>2013-10-15 15:26:22 +0200
commit75fa27eacaa12ce9c9630db787f69fd0d70bcfc3 (patch)
tree8887c2197fcdf65058e9996733f65478dc4df546 /src/qt/bitcoinamountfield.cpp
parent38d15d8b427904a936a4fb4b8ac390bd637e1638 (diff)
make BitcoinAmountField::setReadOnly() usable
- use it for secure payment-requests (this change allows a copy&paste of the amount and looks a little nicer than just a disabled GUI element)
Diffstat (limited to 'src/qt/bitcoinamountfield.cpp')
-rw-r--r--src/qt/bitcoinamountfield.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qt/bitcoinamountfield.cpp b/src/qt/bitcoinamountfield.cpp
index d9d4e3b23d..37b8743eff 100644
--- a/src/qt/bitcoinamountfield.cpp
+++ b/src/qt/bitcoinamountfield.cpp
@@ -130,9 +130,10 @@ void BitcoinAmountField::setValue(qint64 value)
setText(BitcoinUnits::format(currentUnit, value));
}
-void BitcoinAmountField::setReadOnly(bool fReadeOnly)
+void BitcoinAmountField::setReadOnly(bool fReadOnly)
{
- // TODO ...
+ amount->setReadOnly(fReadOnly);
+ unit->setEnabled(!fReadOnly);
}
void BitcoinAmountField::unitChanged(int idx)