NOISSUE change icon themes without restart
This commit is contained in:
		@@ -975,6 +975,7 @@ void MainWindow::on_actionSettings_triggered()
 | 
				
			|||||||
	proxymodel->invalidate();
 | 
						proxymodel->invalidate();
 | 
				
			||||||
	proxymodel->sort(0);
 | 
						proxymodel->sort(0);
 | 
				
			||||||
	updateToolsMenu();
 | 
						updateToolsMenu();
 | 
				
			||||||
 | 
						update();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void MainWindow::on_actionInstanceSettings_triggered()
 | 
					void MainWindow::on_actionInstanceSettings_triggered()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -272,6 +272,7 @@ void MultiMCPage::applySettings()
 | 
				
			|||||||
	// Updates
 | 
						// Updates
 | 
				
			||||||
	s->set("AutoUpdate", ui->autoUpdateCheckBox->isChecked());
 | 
						s->set("AutoUpdate", ui->autoUpdateCheckBox->isChecked());
 | 
				
			||||||
	s->set("UpdateChannel", m_currentUpdateChannel);
 | 
						s->set("UpdateChannel", m_currentUpdateChannel);
 | 
				
			||||||
 | 
						auto original = s->get("IconTheme").toString();
 | 
				
			||||||
	//FIXME: make generic
 | 
						//FIXME: make generic
 | 
				
			||||||
	switch (ui->themeComboBox->currentIndex())
 | 
						switch (ui->themeComboBox->currentIndex())
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
@@ -299,6 +300,11 @@ void MultiMCPage::applySettings()
 | 
				
			|||||||
		break;
 | 
							break;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if(original != s->get("IconTheme"))
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							QIcon::setThemeName(s->get("IconTheme").toString());
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Console settings
 | 
						// Console settings
 | 
				
			||||||
	s->set("ShowConsole", ui->showConsoleCheck->isChecked());
 | 
						s->set("ShowConsole", ui->showConsoleCheck->isChecked());
 | 
				
			||||||
	s->set("AutoCloseConsole", ui->autoCloseConsoleCheck->isChecked());
 | 
						s->set("AutoCloseConsole", ui->autoCloseConsoleCheck->isChecked());
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user