diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index 2a41f4316..e97864a3a 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -754,10 +754,6 @@ void MainWindow::on_actionCtrl_Alt_Esc_triggered() { void MainWindow::on_actionPause_triggered() { plat_pause(dopause ^ 1); - auto pause_icon = dopause ? QIcon(":/menuicons/win/icons/run.ico") : QIcon(":/menuicons/win/icons/pause.ico"); - auto tooltip_text = dopause ? QString(tr("Resume execution")) : QString(tr("Pause execution")); - ui->actionPause->setIcon(pause_icon); - ui->actionPause->setToolTip(tooltip_text); } void MainWindow::on_actionExit_triggered() { @@ -2056,6 +2052,13 @@ void MainWindow::setSendKeyboardInput(bool enabled) send_keyboard_input = enabled; } +void MainWindow::setUiPauseState(bool paused) { + auto pause_icon = paused ? QIcon(":/menuicons/win/icons/run.ico") : QIcon(":/menuicons/win/icons/pause.ico"); + auto tooltip_text = paused ? QString(tr("Resume execution")) : QString(tr("Pause execution")); + ui->actionPause->setIcon(pause_icon); + ui->actionPause->setToolTip(tooltip_text); +} + void MainWindow::on_actionPreferences_triggered() { ProgSettings progsettings(this); diff --git a/src/qt/qt_mainwindow.hpp b/src/qt/qt_mainwindow.hpp index c48333706..a91fd1f57 100644 --- a/src/qt/qt_mainwindow.hpp +++ b/src/qt/qt_mainwindow.hpp @@ -33,6 +33,7 @@ public: void blitToWidget(int x, int y, int w, int h, int monitor_index); QSize getRenderWidgetSize(); void setSendKeyboardInput(bool enabled); + void setUiPauseState(bool paused); std::array, 8> renderers; signals: diff --git a/src/qt/qt_platform.cpp b/src/qt/qt_platform.cpp index 10a6654c0..4163b0ce5 100644 --- a/src/qt/qt_platform.cpp +++ b/src/qt/qt_platform.cpp @@ -366,6 +366,7 @@ plat_pause(int p) ui_window_title(oldtitle); } discord_update_activity(dopause); + main_window->setUiPauseState(p); #ifdef Q_OS_WINDOWS if (source_hwnd)