Skip to content

Support for Light mode #698

Description

@drtingli

Context
Customization is personal, but I hope I'm not alone on this problem.

I'm running LogExpert v1.42.0.0 and I set Windows 11 to work in dark mode (default for theme-aware software).
However, I prefer to read log files using LogExpert in light mode. (There are many possible reasons to explain this need, but it anyway remains as a personal flavor).

The problem
I'm aware that there is an option in the configuration to force LogExpert works in dark mode (and it works well with the recent fix for bug #555 ). But it seems the software misses an option to force it to work in light mode. This seems confirmed by the source code:

    [SupportedOSPlatform("windows")]
    private static void SetDarkMode ()
    {
        var darkModeEnabled = ConfigManager.Instance.Settings.Preferences.DarkMode;
        if (darkModeEnabled)
        {
            Application.SetColorMode(SystemColorMode.Dark);
        }
        else
        {
            Application.SetColorMode(SystemColorMode.System);
        }
    }

where it only forces the dark mode but not the light mode (SystemColorMode.System is to follow the OS setting). Since my Windows is set to dark theme by default, it means LogExpert will always work in dark mode.

Possible solution
It would be great that in the configuration of LogExpert itself the user can choose the dark or light mode (in dependent to the OS theme color). According to this page https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.application.setcolormode?view=windowsdesktop-10.0 , this should be possible with a call Application.SetColorMode(SystemColorMode.Classic);. In the configuration GUI, as offered in other software, three choices can be provided ie. light, dark and system.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugPesky little gritter, needs squashing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions