UniGetUI icon indicating copy to clipboard operation
UniGetUI copied to clipboard

[BUG] UniGetUI Logs and Package Manager Logs unreadable in dark mode (font is black)

Open redactedscribe opened this issue 1 year ago • 9 comments

Please confirm these before moving forward

  • [X] I have searched for my issue and have not found a work-in-progress/duplicate/resolved issue.
  • [X] I have tested that this issue has not been fixed in the latest (beta or stable) release.
  • [X] I have checked the FAQ section for solutions.
  • [X] This issue is about a bug (if it is not, please use the correct template).

UniGetUI Version

3.1.0 beta 1

Windows version, edition and architecture

Windows 11 Pro

Describe your issue

When the Application theme setting is set to Follow system color scheme, the mentions logs also become dark when dark mode activates. The text is very difficult to read because the main font remains black (unlike the Operations history).

Steps to reproduce the issue

Toggle dark mode on.

UniGetUI Log

-

Package Managers Logs

-

Relevant information

As a side note, perhaps the Application theme setting should be moved from the General preferences section to the User interface preferences section? It seems this UI section is only used to customise double-clicking packages, so maybe not.

Screenshots and videos

UniGetUI Logs:

WingetUI_2024-07-01_21-07-33

Package Manager Logs:

WingetUI_2024-07-01_21-08-30

redactedscribe avatar Jul 01 '24 18:07 redactedscribe

This is weird...

Perhaps you have you changed the window theme without restarting UniGetUI? If so, this needs to be fixed

marticliment avatar Jul 01 '24 20:07 marticliment

Perhaps you have you changed the window theme without restarting UniGetUI?

This is a bug which occurs in some other software too, maybe because of a common framework. And yes restarting usually solves the problem, until the next dark mode toggle. Restarting UniGetUI also "fixed" the issue.

redactedscribe avatar Jul 01 '24 21:07 redactedscribe

@marticliment Unfortunately, this bug still occurs in beta 2. Restarting UniGetUI is required to fix the dark mode log issue.

redactedscribe avatar Jul 02 '24 18:07 redactedscribe

Is it? I have been able to toggle the app theme and open the logs without any issue...

What happens ig you reload the log?

marticliment avatar Jul 02 '24 18:07 marticliment

Right. I'm not sure if this was the case before, but yes, the log must be toggled. If the theme switches with the log open, the font colours aren't updated. Toggling the log loads the needed font colours. Not a major issue as it's rare to have the log open when the theme switches.

redactedscribe avatar Jul 02 '24 18:07 redactedscribe

The system tray icon also remains the previous theme's colour after the theme switches.

redactedscribe avatar Jul 03 '24 09:07 redactedscribe

https://github.com/marticliment/UniGetUI/pull/2366

marticliment avatar Jul 03 '24 09:07 marticliment

Just to note this somewhere: The title bar minimise, maximise and close buttons also stay white when switching from dark to light.

UniGetUI_2024-07-23_19-03-37

redactedscribe avatar Jul 23 '24 16:07 redactedscribe

This will be fixed by #2490

marticliment avatar Jul 23 '24 22:07 marticliment

Try setting this environment variable as follows (I set it in personal env but system env may work):- WEBVIEW2_DEFAULT_BACKGROUND_COLOR=Dark This makes all the logs except the UniGet log use white text on a black background. The UniGet log uses 2 different shades of grey for log level 4 (more) and log level 5 (debug) which are a little more difficult to read but they are much more legible than the black text on black (dark grey) background. Log level 2 (Warnings) is yellow and log level 3 (less) is bright white. I suspect log level 1 (Errors) might be red but I don't see errors as frequently. The Release Notes and the Help pages also show a very readable "dark" mode.

bigtone58 avatar Jan 14 '25 11:01 bigtone58

Try setting this environment variable as follows (I set it in personal env but system env may work):- WEBVIEW2_DEFAULT_BACKGROUND_COLOR=Dark This makes all the logs except the UniGet log use white text on a black background. The UniGet log uses 2 different shades of grey for log level 4 (more) and log level 5 (debug) which are a little more difficult to read but they are much more legible than the black text on black (dark grey) background. Log level 2 (Warnings) is yellow and log level 3 (less) is bright white. I suspect log level 1 (Errors) might be red but I don't see errors as frequently. The Release Notes and the Help pages also show a very readable "dark" mode.

I am not going to argue whether this solution works or not, but UniGetUI does not use WebView for the logs, so it doesn't make any sense that this could be a solution. Could it be that what is helping here is restarting UniGetUI after changing the env variable?

marticliment avatar Jan 14 '25 14:01 marticliment