aboutsummaryrefslogtreecommitdiff
path: root/src/qt/sendcoinsdialog.cpp
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2019-08-23 20:13:11 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2019-08-23 21:27:50 +0300
commit1260ecd812e35185898fd555ad3e01d019072bcf (patch)
tree02a9912efdfadafbea77535b6730b141167a569f /src/qt/sendcoinsdialog.cpp
parent442a9c64775454a7073aff9872721c58b1dd35c5 (diff)
qt: Add TextWidth() wrapper
In Qt 5.12 and before the QFontMetrics::width() is used and it is deprecated since Qt 13.0. In Qt 5.11 the QFontMetrics::horizontalAdvance() was introduced.
Diffstat (limited to 'src/qt/sendcoinsdialog.cpp')
-rw-r--r--src/qt/sendcoinsdialog.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp
index 193fba78b1..f8c415cf52 100644
--- a/src/qt/sendcoinsdialog.cpp
+++ b/src/qt/sendcoinsdialog.cpp
@@ -703,7 +703,7 @@ void SendCoinsDialog::updateSmartFeeLabel()
int lightness = ui->fallbackFeeWarningLabel->palette().color(QPalette::WindowText).lightness();
QColor warning_colour(255 - (lightness / 5), 176 - (lightness / 3), 48 - (lightness / 14));
ui->fallbackFeeWarningLabel->setStyleSheet("QLabel { color: " + warning_colour.name() + "; }");
- ui->fallbackFeeWarningLabel->setIndent(QFontMetrics(ui->fallbackFeeWarningLabel->font()).width("x"));
+ ui->fallbackFeeWarningLabel->setIndent(GUIUtil::TextWidth(QFontMetrics(ui->fallbackFeeWarningLabel->font()), "x"));
}
else
{