mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	qt_themes: add themed connected/disconnected icons for dark and fix status bar theme updating
In dark theme, it is very hard to see the connected/disconnected icons because they are dark too. So I added two white-coloured icons for the dark theme. This also fixed an issue where theme update does not change the icon on the status bar.
This commit is contained in:
		
							parent
							
								
									4a3c4f5f67
								
							
						
					
					
						commit
						b1bbe0441e
					
				
					 6 changed files with 13 additions and 0 deletions
				
			
		|  | @ -440,6 +440,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