diff options
| author | Jonas Schnelli <[email protected]> | 2019-01-17 11:16:54 -1000 |
|---|---|---|
| committer | Jonas Schnelli <[email protected]> | 2019-01-17 11:17:06 -1000 |
| commit | cd42553b1178a48a16017eff0b70669c84c3895c (patch) | |
| tree | 4bd002fd919f3fa81740400bf21cbeb4f3bf8374 /src/qt/bitcoingui.cpp | |
| parent | Merge #15166: qa: Pin shellcheck version (diff) | |
| parent | Add workaround for QProgressDialog bug on macOS (diff) | |
| download | discoin-cd42553b1178a48a16017eff0b70669c84c3895c.tar.xz discoin-cd42553b1178a48a16017eff0b70669c84c3895c.zip | |
Merge #15040: qt: Add workaround for QProgressDialog bug on macOS
7c572c488 Add workaround for QProgressDialog bug on macOS (Hennadii Stepanov)
Pull request description:
Fix #15016.
Refs:
- [QTBUG-65750: QProgressDialog too small width at larger font size on Mac](https://bugreports.qt.io/browse/QTBUG-65750)
- [QTBUG-70357: QProgressDialog is too narrow to fit the text of its label](https://bugreports.qt.io/browse/QTBUG-70357)
With this PR:

Tree-SHA512: dde668dfa7d2144973c0e868aea7fdb7d90f78584836d024ffefb8df4a709d6842fa3601954759b4462856a80e81df15b861ea39506599230a16928b621d9f8f
Diffstat (limited to 'src/qt/bitcoingui.cpp')
| -rw-r--r-- | src/qt/bitcoingui.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index ddaf771fa..4417e48fb 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -1245,25 +1245,21 @@ void BitcoinGUI::detectShutdown() void BitcoinGUI::showProgress(const QString &title, int nProgress) { - if (nProgress == 0) - { - progressDialog = new QProgressDialog(title, "", 0, 100); + if (nProgress == 0) { + progressDialog = new QProgressDialog(title, QString(), 0, 100); + GUIUtil::PolishProgressDialog(progressDialog); progressDialog->setWindowModality(Qt::ApplicationModal); progressDialog->setMinimumDuration(0); - progressDialog->setCancelButton(nullptr); progressDialog->setAutoClose(false); progressDialog->setValue(0); - } - else if (nProgress == 100) - { - if (progressDialog) - { + } else if (nProgress == 100) { + if (progressDialog) { progressDialog->close(); progressDialog->deleteLater(); } - } - else if (progressDialog) + } else if (progressDialog) { progressDialog->setValue(nProgress); + } } void BitcoinGUI::setTrayIconVisible(bool fHideTrayIcon) |