mirror of
https://github.com/86Box/86Box.git
synced 2026-02-24 02:18:20 -07:00
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:
@@ -116,6 +116,9 @@ VMManagerMainWindow(QWidget *parent)
|
||||
// Inform the main view when preferences are updated
|
||||
connect(this, &VMManagerMainWindow::preferencesUpdated, vmm, &VMManagerMain::onPreferencesUpdated);
|
||||
connect(this, &VMManagerMainWindow::languageUpdated, vmm, &VMManagerMain::onLanguageUpdated);
|
||||
#ifdef Q_OS_WINDOWS
|
||||
connect(this, &VMManagerMainWindow::darkModeUpdated, vmm, &VMManagerMain::onDarkModeUpdated);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
@@ -178,6 +181,15 @@ VMManagerMainWindow::updateLanguage()
|
||||
emit languageUpdated();
|
||||
}
|
||||
|
||||
|
||||
#ifdef Q_OS_WINDOWS
|
||||
void
|
||||
VMManagerMainWindow::updateDarkMode()
|
||||
{
|
||||
emit darkModeUpdated();
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
VMManagerMainWindow::changeEvent(QEvent *event)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user