weisJ / auto-dark-mode

IDEA plugin to automatically apply system theme settings on macOS and Windows.
https://plugins.jetbrains.com/plugin/14076-auto-dark-mode
MIT License
53 stars 14 forks source link

Some parts of UI are not updated on theme switch #2

Closed eugene-stativka closed 4 years ago

eugene-stativka commented 4 years ago

MacOS Catalina. WebStorm 2020.1. v1.1.0-pre2 I noticed that sometimes some parts of UI are not updated to the respective colour theme. Please see light toolbars when the dark theme is applied image

weisJ commented 4 years ago

I am using the official API for switching the theme i.e.

QuickChangeLookAndFeel.switchLafAndUpdateUI(LafManager.getInstance(), targetLaf, true);

I'll have to see if there is a more reliable api but please consider reporting this to Jetbrains.

bric3 commented 4 years ago

@eugene-stativka I see you are using the material theme, it maybe a good idea to see if it's related to this plugin in particular. Or the combination of the theme and intellij.

weisJ commented 4 years ago

@bric3 It also occurs when using the Dracula theme. I have had it happen myself but could not reproduce it reliably.

weisJ commented 4 years ago

I wonder if this has to do with updating the laf asynchronously. IntelliJ platform itself only ever calls it synchronously i.e.

QuickChangeLookAndFeel.switchLafAndUpdateUI(LafManager.getInstance(), targetLaf, false);

I guess I'll do the same thing. However it's still worth while to report that changing the laf asynchronously does not work properly.

Edit: The theme settings panel itself also calls the method asynchronously, so there is something else at play here. Nonetheless I'll test how it behaves when calling it synchronously.

weisJ commented 4 years ago

@eugene-stativka The new pre-release hopefully resolves this problem.