diff --git a/dist/qt_themes/qdarkstyle/icons/16x16/connected.png b/dist/qt_themes/qdarkstyle/icons/16x16/connected.png new file mode 100644 index 000000000..90feb372a Binary files /dev/null and b/dist/qt_themes/qdarkstyle/icons/16x16/connected.png differ diff --git a/dist/qt_themes/qdarkstyle/icons/16x16/disconnected.png b/dist/qt_themes/qdarkstyle/icons/16x16/disconnected.png new file mode 100644 index 000000000..fc5f23894 Binary files /dev/null and b/dist/qt_themes/qdarkstyle/icons/16x16/disconnected.png differ diff --git a/dist/qt_themes/qdarkstyle/style.qrc b/dist/qt_themes/qdarkstyle/style.qrc index c2c14c28a..bcb121d4b 100644 --- a/dist/qt_themes/qdarkstyle/style.qrc +++ b/dist/qt_themes/qdarkstyle/style.qrc @@ -1,6 +1,8 @@ icons/index.theme + icons/16x16/connected.png + icons/16x16/disconnected.png icons/16x16/lock.png icons/48x48/bad_folder.png icons/48x48/chip.png diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index d15674f18..5c7c74dd6 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp @@ -448,6 +448,8 @@ void GMainWindow::ConnectWidgetEvents() { connect(this, &GMainWindow::UpdateProgress, this, &GMainWindow::OnUpdateProgress); connect(this, &GMainWindow::CIAInstallReport, this, &GMainWindow::OnCIAInstallReport); connect(this, &GMainWindow::CIAInstallFinished, this, &GMainWindow::OnCIAInstallFinished); + connect(this, &GMainWindow::UpdateThemedIcons, multiplayer_state, + &MultiplayerState::UpdateThemedIcons); } void GMainWindow::ConnectMenuEvents() { diff --git a/src/citra_qt/multiplayer/state.cpp b/src/citra_qt/multiplayer/state.cpp index cb264b2a0..c3ff03af1 100644 --- a/src/citra_qt/multiplayer/state.cpp +++ b/src/citra_qt/multiplayer/state.cpp @@ -134,6 +134,14 @@ void MultiplayerState::OnAnnounceFailed(const Common::WebResult& result) { QMessageBox::Ok); } +void MultiplayerState::UpdateThemedIcons() { + if (current_state == Network::RoomMember::State::Joined) { + status_icon->setPixmap(QIcon::fromTheme("connected").pixmap(16)); + } else { + status_icon->setPixmap(QIcon::fromTheme("disconnected").pixmap(16)); + } +} + static void BringWidgetToFront(QWidget* widget) { widget->show(); widget->activateWindow(); diff --git a/src/citra_qt/multiplayer/state.h b/src/citra_qt/multiplayer/state.h index 5463cd461..b375a81a6 100644 --- a/src/citra_qt/multiplayer/state.h +++ b/src/citra_qt/multiplayer/state.h @@ -46,6 +46,7 @@ public slots: void OnOpenNetworkRoom(); void OnDirectConnectToRoom(); void OnAnnounceFailed(const Common::WebResult&); + void UpdateThemedIcons(); signals: void NetworkStateChanged(const Network::RoomMember::State&);