mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 20:28:56 +00:00
meh
This commit is contained in:
parent
639e671d6b
commit
9d9204430e
9 changed files with 2 additions and 219 deletions
|
@ -241,11 +241,6 @@ MainWindow::MainWindow(std::unique_ptr<BootParameters> boot_parameters,
|
|||
ConnectMenuBar();
|
||||
ConnectHotkeys();
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
|
||||
connect(QGuiApplication::styleHints(), &QStyleHints::colorSchemeChanged, this,
|
||||
[](Qt::ColorScheme colorScheme) { Settings::Instance().ApplyStyle(); });
|
||||
#endif
|
||||
|
||||
connect(m_cheats_manager, &CheatsManager::OpenGeneralSettings, this,
|
||||
&MainWindow::ShowGeneralWindow);
|
||||
|
||||
|
@ -1865,29 +1860,6 @@ QSize MainWindow::sizeHint() const
|
|||
#ifdef _WIN32
|
||||
bool MainWindow::nativeEvent(const QByteArray& eventType, void* message, qintptr* result)
|
||||
{
|
||||
auto* msg = reinterpret_cast<MSG*>(message);
|
||||
if (msg && msg->message == WM_SETTINGCHANGE && msg->lParam != NULL &&
|
||||
std::wstring_view(L"ImmersiveColorSet")
|
||||
.compare(reinterpret_cast<const wchar_t*>(msg->lParam)) == 0)
|
||||
{
|
||||
// Windows light/dark theme has changed. Update our flag and refresh the theme.
|
||||
auto& settings = Settings::Instance();
|
||||
const bool was_dark_before = settings.IsSystemDark();
|
||||
settings.UpdateSystemDark();
|
||||
if (settings.IsSystemDark() != was_dark_before)
|
||||
{
|
||||
settings.ApplyStyle();
|
||||
|
||||
// force the colors in the Skylander window to update
|
||||
if (m_skylander_window)
|
||||
m_skylander_window->RefreshList();
|
||||
}
|
||||
|
||||
// TODO: When switching from light to dark, the window decorations remain light. Qt seems very
|
||||
// convinced that it needs to change these in response to this message, so even if we set them
|
||||
// to dark here, Qt sets them back to light afterwards.
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue