Got it working with 2 gotchas:
- During AppearanceChanged the appearance hasn’t finished changing.
- After resetting the appearance Color.isDarkMode doesn’t work anymore.
Got it working with 2 gotchas:
I used to use a Pure Xojo solution, whereby I’d clear any caches on the appearanceChanged
event.
control.paint
is where I’d rebuild the cache (if needed) as that’s where the colors are going to be correct. This is fundamentally bad as you’ve adding more weight to the paint event which should never be done.
Using my own Ohanaware App Kit library, there’s several things I do dofferently.
viewDidChangeEffectiveAppearance
event.