Skip to content

Commit f5db3f2

Browse files
committed
Merge #16758: qt: Replace QFontMetrics::width() with TextWidth()
8b6f5aa qt: Replace QFontMetrics::width() with TextWidth() (Hennadii Stepanov) Pull request description: Compiling master (d8fc997) 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 8b6f5aa Tree-SHA512: 65cd8bea550150e5ee47c1e906d8c2393547cf4feba3701a933a4f24fad5ecdb552ac2de4e1200ed14efaa0df0480150dd58fccbddc3b902f6c2141603874902
2 parents a8ecd0d + 8b6f5aa commit f5db3f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/qt/guiutil.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,7 @@ void PolishProgressDialog(QProgressDialog* dialog)
947947
{
948948
#ifdef Q_OS_MAC
949949
// Workaround for macOS-only Qt bug; see: QTBUG-65750, QTBUG-70357.
950-
const int margin = dialog->fontMetrics().width("X");
950+
const int margin = TextWidth(dialog->fontMetrics(), ("X"));
951951
dialog->resize(dialog->width() + 2 * margin, dialog->height());
952952
dialog->show();
953953
#else

0 commit comments

Comments
 (0)