Thick white borders around menu lists in dark mode

Started by Chris

Chris

Thick white borders around menu lists in dark mode   06 February 2022, 17:03

Maybe you can help me diag a long-standing Windows GUI annoyance.

Back-story: this PC's system drive has been cloned/upgraded since probably WinXP, so I believe the problem was introduced long before dark mode existed in Windows. I've also narrowed down my user profile to being the cause of the behaviour - I just don't feel like creating a new profile and copying settings over. Until the dark mode was added to Network Scanner, I only ever saw it in Windows system context menus (and only in File Explorer), but both have thick white borders.

Since your program has the same thick white lines in dark mode (and I assume that its not by design), maybe you have an idea where in the registry these sorta broken theme-related settings are parked? I've looked every now and then for years to find them, to no avail. Have seen this Windows issue mentioned in some forums, but again no solution.

No worries if you don't have the time, nor a clue what I'm talking about. Thanks for reading, at least.

Cheers, and love your program. Loooooong time paid user.
SoftPerfect Support forum - Ann avatar image
Ann

Re: Thick white borders around menu lists in dark mode   06 February 2022, 17:56

Thanks for pointing out the issue with the menu. We have checked the code and it turned out that we were not 100% correctly setting the menu background.

Specifically, there is a function called SetMenuInfo that amongst others takes two flags: MIM_BACKGROUND and MIM_APPLYTOSUBMENUS. The issue here that we were passing only MIM_BACKGROUND without MIM_APPLYTOSUBMENUS. This resulted in the menu background being drawn in the default grey colour.

Now we have fixed it. Please download the latest build, all menus should look good now.

I am afraid we can't help with fixing this in Windows though. There may even be no registry setting, but a similar issue in Microsoft's code. Another possibility may be that that one of the menu extensions (TreeSize, Git or AMD) causes Windows to recreate menu handle, so the background setting is lost. That's just our guess.
Hmm no, that doesn't fix it. But in any case, its not a big deal, and probably only affects a very small number of customers who have their profiles broken in this exact way. Whatever it is, it's actually not the color, its the menu border thickness/width - and the same issue displays in Windows Explorer. It should be ~1px in Windows normally, and on a different profile your program shows the border correctly just like Windows Explorer context in dark mode: 1px, white. On my regular profile both your program and Win Explorer have that extra-wide menu border.
Oh well. Thanks for the suggestions - ill look at maybe one of the context addons.
SoftPerfect Support forum - Ann avatar image
Ann

Re: Thick white borders around menu lists in dark mode   06 February 2022, 20:25

The changes that we have made that remove the white borders should work on a valid profile and Windows settings. So if the Windows Explorer shows the menus nicely, so will our app. In your regular profile however it seems something is not quite right, so both Windows and NetScanner menus have this border.

I would recommend recreating the profile to ensure both Windows Explorer and our app display nicely. I know you mentioned you didn't particularly want to do it, but it may be the only way to fix it.

Sometimes you can find a solution faster if you try the forum search, have a look at the knowledge base, or check the software user manual to see if your question has already been answered.

Our forum rules are simple:

  • Be polite.
  • Do not spam.
  • Write in English. If possible, check your spelling and grammar.

Author:

Subject

A brief and informative title for your message, approximately 4–8 words:

     

Spam prevention: please enter the following code in the input field below.

 **    **  **     **  ********   ********   **     ** 
 ***   **   **   **   **     **  **     **   **   **  
 ****  **    ** **    **     **  **     **    ** **   
 ** ** **     ***     **     **  **     **     ***    
 **  ****    ** **    **     **  **     **    ** **   
 **   ***   **   **   **     **  **     **   **   **  
 **    **  **     **  ********   ********   **     ** 

Message: