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 committed by Nayla Hanegan
parent 887b07af71
commit 521d6e93c7
No known key found for this signature in database
GPG key ID: 3075216CED0DB01D
8 changed files with 97 additions and 28 deletions

View file

@ -1835,8 +1835,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.