Changeset View
Changeset View
Standalone View
Standalone View
src/qt/guiutil.cpp
Show First 20 Lines • Show All 975 Lines • ▼ Show 20 Lines | |||||
#else | #else | ||||
return fm.width(text); | return fm.width(text); | ||||
#endif | #endif | ||||
} | } | ||||
void PolishProgressDialog(QProgressDialog *dialog) { | 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 = GUIUtil::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 | ||||
Q_UNUSED(dialog); | Q_UNUSED(dialog); | ||||
#endif | #endif | ||||
} | } | ||||
} // namespace GUIUtil | } // namespace GUIUtil |