Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

High contrast ?

Post Reply
thefunkyjoint
Posts: 513
Joined: Thu Aug 10, 2017 12:40 pm

High contrast ?

Post 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.
User avatar
salvadordf
Posts: 4580
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: High contrast ?

Post 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';
thefunkyjoint
Posts: 513
Joined: Thu Aug 10, 2017 12:40 pm

Re: High contrast ?

Post by thefunkyjoint »

Thanks, it worked ! :D
Post Reply