Page 1 of 1

High contrast ?

Posted: Mon Dec 20, 2021 5:08 pm
by thefunkyjoint
I've noticed that when you enable High contrast in Windows config, pages in CEF4Delphi will have dark theme by defult, being all black background following the system config.

Is there a way to enable this only in CEF4Delphi config, without having to active High Contrast in Windows settings ? What i want is to leave Windows config without high contrast theme, but CEF4Delphi yes.

Re: High contrast ?

Posted: Mon Dec 20, 2021 6:43 pm
by salvadordf
If you mean the "Dark mode" then yes, you can enable it but the last time I checked it was marked as an experimental feature in Chromium.

Add this code before the GlobalCEFApp.StartMainProcess call in the DPR file :

Code: Select all

GlobalCEFApp.BlinkSettings := 'forceDarkModeEnabled';

Re: High contrast ?

Posted: Mon Dec 20, 2021 11:03 pm
by thefunkyjoint
Thanks, it worked ! :D