qt: Replace QFontMetrics::width() with TextWidth()

This commit is contained in:
Hennadii Stepanov 2019-08-29 19:13:19 +03:00
parent d8fc997913
commit 8b6f5aabb9
No known key found for this signature in database
GPG key ID: 410108112E7EA81F

View file

@ -947,7 +947,7 @@ void PolishProgressDialog(QProgressDialog* dialog)
{ {
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
// Workaround for macOS-only Qt bug; see: QTBUG-65750, QTBUG-70357. // 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->resize(dialog->width() + 2 * margin, dialog->height());
dialog->show(); dialog->show();
#else #else