diff options
author | fanquake <fanquake@gmail.com> | 2019-08-30 10:15:35 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2019-08-30 10:27:28 +0800 |
commit | f5db3f2128f0b293432a5a36cb0314b501019a06 (patch) | |
tree | 8e523bd25e30d955f3bbfbcfcc3686765831d108 /src/qt | |
parent | a8ecd0dadaabaaf8c87dfc42d5e27cf2cd714132 (diff) | |
parent | 8b6f5aabb9b21bea875170ae0f49661a4e38dbd3 (diff) |
Merge #16758: qt: Replace QFontMetrics::width() with TextWidth()
8b6f5aabb9b21bea875170ae0f49661a4e38dbd3 qt: Replace QFontMetrics::width() with TextWidth() (Hennadii Stepanov)
Pull request description:
Compiling master (d8fc9979130a268cf55b12c223b20fd7d4b9f67f) on macOS Catalina (with a patch from #16720) reveals one more instance of `QFontMetrics::width()` which is supposed to be replaced with `TextWidth()` in the merged #16701.
Sorry for incomplete solution provided in #16701. It’s especially sad that the line I missed lies in only 7 lines from the code touched in #16701.
ACKs for top commit:
fanquake:
ACK 8b6f5aabb9b21bea875170ae0f49661a4e38dbd3
Tree-SHA512: 65cd8bea550150e5ee47c1e906d8c2393547cf4feba3701a933a4f24fad5ecdb552ac2de4e1200ed14efaa0df0480150dd58fccbddc3b902f6c2141603874902
Diffstat (limited to 'src/qt')
-rw-r--r-- | src/qt/guiutil.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index bbe6e9bf87..59c7c0a44a 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -947,7 +947,7 @@ void PolishProgressDialog(QProgressDialog* dialog) { #ifdef Q_OS_MAC // Workaround for macOS-only Qt bug; see: QTBUG-65750, QTBUG-70357. - const int margin = dialog->fontMetrics().width("X"); + const int margin = TextWidth(dialog->fontMetrics(), ("X")); dialog->resize(dialog->width() + 2 * margin, dialog->height()); dialog->show(); #else |