This shows one possible way of adapting the application to support dark mode, using the default for/background colours and SelectLightDark() for the custom ones. Note that this replaces "background" field of the styles in this sample as it was never used (more precisely, was always specified as "WHITE") with the new "foregroundDark" field which is set pretty arbitrarily but differently enough from the foreground used in light mode for the sample to look better in dark mode. Also remove some duplicated code for setting styles and remove the code for setting the defaults completely, as this is unnecessary, and even harmful, after the changes of the previous commit. |
||
|---|---|---|
| .. | ||
| defsext.h | ||
| descrip.mms | ||
| edit.cpp | ||
| edit.h | ||
| makefile.gcc | ||
| Makefile.in | ||
| makefile.unx | ||
| makefile.vc | ||
| prefs.cpp | ||
| prefs.h | ||
| stctest.bkl | ||
| stctest.cpp | ||