DolphinQt: Adjust panel-specific colors and syntax highlighting for dark theme.

This commit is contained in:
Admiral H. Curtiss
2023-08-01 20:47:17 +02:00
parent c2e29153e9
commit 24012cfc7f
8 changed files with 97 additions and 28 deletions

View File

@ -1728,8 +1728,14 @@ bool MainWindow::nativeEvent(const QByteArray& eventType, void* message, qintptr
const bool was_dark_before = settings.IsSystemDark();
settings.UpdateSystemDark();
if (settings.IsSystemDark() != was_dark_before)
{
settings.SetCurrentUserStyle(settings.GetCurrentUserStyle());
// 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.