Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

Automatic switching between Dark and Light Mode

CommanderTom66's profile image CommanderTom66 posted 1 month ago in Feature discussion Permalink

Hi Ansgar,

I would really welcome if HeidiSQL implements automatic switching between Light and Dark Mode in Windows 10. With the help of Mahdi Safsafi excellent Components (https://github.com/MahdiSafsafi/ImmersiveColors/tree/next), it is really easy to sitch the active Themes in Delphi.

If you use his Component "ImmersiveNotify" you could get a Delphi Event if OS or User switches between the Light and Dark Mode. Within this Event, you do easily the following:

// Check of OS supports Theming
IF OsSupportsImmersiveColors THEN
BEGIN
  // Check if Dark Theme is active
  IF (IsDarkThemeActive()) THEN
  BEGIN
    // Set Dark Theme for the Program
    TStyleManager.SetStyle('Windows10 Dark');
  END
  ELSE
  BEGIN
    // Set Light Theme for the Program
    TStyleManager.SetStyle('Windows10');
  END;
END;

If you could choose in the Options Dialog between a Light Theme and a Dark Theme and an Checkbox to automatic switch the Theme for the User, then you are already done.

Dark Mode at Night is perfect and I have not to switch myself between a Light and a Dark Theme and have to Restart the Program every Evening and every Morning. With TStyleManager.SetStyle, the Style will be switched without a Restart on the Fly.

Thomas

Please login to leave a reply, or register at first.




Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.