mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 21:30:04 +00:00 
			
		
		
		
	Merge pull request #4010 from zhaowenlan1779/statusbar-retheme
qt_themes: add themed connected/disconnected icons for dark and fix status bar theme updating
This commit is contained in:
		
						commit
						7b46b7e29a
					
				
					 6 changed files with 13 additions and 0 deletions
				
			
		|  | @ -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() { | ||||
|  |  | |||
|  | @ -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(); | ||||
|  |  | |||
|  | @ -46,6 +46,7 @@ public slots: | |||
|     void OnOpenNetworkRoom(); | ||||
|     void OnDirectConnectToRoom(); | ||||
|     void OnAnnounceFailed(const Common::WebResult&); | ||||
|     void UpdateThemedIcons(); | ||||
| 
 | ||||
| signals: | ||||
|     void NetworkStateChanged(const Network::RoomMember::State&); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue