Manager: Fix style not reacting to Windows light/dark mode change
Add a native event filter for dark mode update, move the function that queries the current theme to qt_util.cpp and make widgets with custom stylesheets update their style on update
This commit is contained in:
@@ -349,7 +349,7 @@ illegal_chars:
|
||||
});
|
||||
|
||||
// Initial default details view
|
||||
vm_details = new VMManagerDetails();
|
||||
vm_details = new VMManagerDetails(ui->detailsArea);
|
||||
ui->detailsArea->layout()->addWidget(vm_details);
|
||||
const QItemSelectionModel *selection_model = ui->listView->selectionModel();
|
||||
|
||||
@@ -785,6 +785,14 @@ VMManagerMain::onLanguageUpdated()
|
||||
vm_details->updateData(selected_sysconfig);
|
||||
}
|
||||
|
||||
#ifdef Q_OS_WINDOWS
|
||||
void
|
||||
VMManagerMain::onDarkModeUpdated()
|
||||
{
|
||||
vm_details->updateStyle();
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
VMManagerMain::getActiveMachineCount()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user