Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dark Mode: Weird Icon Highlighting on Windows 11 #10510

Closed
WildByDesign opened this issue Sep 6, 2021 · 16 comments
Closed

Dark Mode: Weird Icon Highlighting on Windows 11 #10510

WildByDesign opened this issue Sep 6, 2021 · 16 comments
Assignees
Labels

Comments

@WildByDesign
Copy link
Contributor

Details:

The current version of Notepad++ (in Dark Mode) shows a weird highlighting for the selected icons and also icons when the mouse hovers over. The icon highlighting in Light Mode looks proper on Windows 11. Therefore, this icon highlighting issue only seems to affect Dark Mode.

Screenshot:

NppDarkModeWindows11

@ts-50
Copy link
Contributor

ts-50 commented Sep 6, 2021

I use both Windows 10 and Linux on a dual-boot machine - when I switched to Linux and ran Notepad++ on Wine (emulating Windows 10), the same issue occurs

@Ddiidev
Copy link

Ddiidev commented Sep 8, 2021

On windows 10 it's working fine, but on windows 11 the same problem occurs.

@CezaryPuchowski
Copy link

Additionally blue/red floppy disc icons before filenames are not shown.
I use this indication very often, without this dark mode is for me not useful

@ts-50
Copy link
Contributor

ts-50 commented Sep 18, 2021

Additionally blue/red floppy disc icons before filenames are not shown.
I use this indication very often, without this dark mode is for me not useful

That is a separate issue

@donho
Copy link
Member

donho commented Sep 18, 2021

@WildByDesign
Could you provide your debug info please?

@WildByDesign
Copy link
Contributor Author

@donho Absolutely.

Notepad++ v8.1.4   (64-bit)
Build time : Aug 21 2021 - 13:04:59
Path : D:\Tools\Notepad++\dark\x64\Notepad++.exe
Command Line : 
Admin mode : OFF
Local Conf mode : ON
Cloud Config : OFF
OS Name : Windows 10 Pro (64-bit) 
OS Version : 2009
OS Build : 22000.194
Current ANSI codepage : 1252
Plugins : mimeTools.dll NppConverter.dll NppExport.dll RainLexer.dll 

@donho donho self-assigned this Sep 18, 2021
@donho
Copy link
Member

donho commented Sep 18, 2021

@thomassmith311 @AlsDev-Sbin
Could you provide your debug info please?

@ts-50
Copy link
Contributor

ts-50 commented Sep 30, 2021

@thomassmith311 @AlsDev-Sbin Could you provide your debug info please?

Sorry, didn't see the message. Debug info when running on Wine:

Notepad++ v8.1.4 (32-bit)
Build time : Aug 21 2021 - 12:58:42
Path : C:\Program Files (x86)\Notepad++\notepad++.exe
Command Line :
Admin mode : ON
Local Conf mode : OFF
Cloud Config : OFF
OS Name : Microsoft Windows 10 (64-bit)
OS Build : 17134.0
Current ANSI codepage : 1252
WINE : 5.0
Plugins : mimeTools.dll NppConverter.dll NppExport.dll

@Ddiidev
Copy link

Ddiidev commented Sep 30, 2021

@thomassmith311 @AlsDev-Sbin Could you provide your debug info please?

Notepad++ v8.1.4 (64-bit)
Build time : Aug 21 2021 - 13:04:59
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line :
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
OS Name : Windows 10 Pro (64-bit)
OS Version : 2009
OS Build : 22000.194
Current ANSI codepage : 1252
Plugins : mimeTools.dll NppConverter.dll NppExport.dll NPPJSONViewer.dll NppSaveAsAdmin.dll RunMe.dll

image

Ps. in the debug info, it doesn't show that it's windows 11 (because it's preview, I assume), but there's a print of winver.exe, then just compare the build version that appears in the debug info with the one in winver.exe

@Fratee
Copy link

Fratee commented Oct 8, 2021

still happening in Notepad++ v8.1.5 (64-bit)
Build time : Sep 26 2021 - 15:23:23
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line :
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
OS Name : Windows 10 Home (64-bit)
OS Version : 2009
OS Build : 22000.194
Current ANSI codepage : 1252
Plugins : ComparePlugin.dll mimeTools.dll NppConverter.dll NppExport.dll NppFTP.dll

@WildByDesign
Copy link
Contributor Author

@ozone10 @adzm If I recall correctly, both of you are the most familiar with the dark mode code. This is happening on Windows 11 and only with dark mode enabled. Light mode displays the icon highlighting correctly.

Do either of you know what part of the dark mode code could be causing this?

Clearly, Microsoft has made some changes with Windows 11 that are causing this conflict with Npp dark mode.

@donho donho added the accepted label Oct 15, 2021
@donho
Copy link
Member

donho commented Oct 15, 2021

Just got Windows 11, and saw these unpleasant stuffs:

image

I'll see what can I do about it.
@adzm @ozone10 @Ashfaaq18 or anyone here if you have the solution please do a PR directely - it'll be the priority.

donho added a commit to donho/notepad-plus-plus that referenced this issue Oct 17, 2021
Notepad++ dark mode works fine under Microsft Windows 7, 8, 8.1 & 10.
Under Windows 11 while Notepad++ being switched into dark mode,
the hightlighting (background) of toolbar's hot-track icons remains in light mode.
Hence this workaround to remedy Notepad++ dark mode visual glitchy due to the bug of Windows 11.

Fix notepad-plus-plus#10510
donho added a commit to donho/notepad-plus-plus that referenced this issue Oct 17, 2021
* Workaround Microsoft dark mode API bug of Windows 11

Notepad++ dark mode works fine under Microsft Windows 7, 8, 8.1 & 10.
Under Windows 11 while Notepad++ being switched into dark mode,
the hightlighting (background) of toolbar's hot-track icons remains in light mode.
Hence this workaround to remedy Notepad++ dark mode visual glitchy due to the bug of Windows 11.

Fix notepad-plus-plus#10510

* Make Notepad++ remains the current behaviour under Windows 10 and older OS
@donho
Copy link
Member

donho commented Oct 17, 2021

Check the code, it's the bug from Microsoft Windows 11 with no doubt.
I've done a (temporarily?) fix/workaround for Windows 11. That's the best I can do so far :(

@donho donho closed this as completed in 5d086f9 Oct 17, 2021
@lilalien
Copy link

I have the exact same issue with Windows 11. The blue icon backgrounds are still there in 8.1.8.

notepadplusplus-win11-dark-mode-selected-icons-bug

@donho
Copy link
Member

donho commented Oct 20, 2021

@lilalien
There's nothing we can do about the light blue highlighting. All I can do (and it's done in Notepad++ v8.1.8) is make the icon visible.
I believe Microsoft is aware of this bug in Windows 11, and it will be fixed on next Windows 11 update (hopefully).

@WildByDesign
Copy link
Contributor Author

@donho @ozone10 @adzm

I have recently done some more research into this issue. It seems to affect programs that utilize win32-darkmode such as Notepad++, Explorer++ and also LibreOffice. Possibly more programs that I am not aware of.

I dug into the aero.msstyles file from Windows 10 and Windows 11 and see that Microsoft made the change to the Toolbar (class) BUTTON (part) image that is used to highlight the toolbar buttons. Microsoft made that image a much lighter/brighter blue which is why it looks so terrible.

I have fixed this by simply editing my aero.msstyles file and replacing a single image and it fixed Notepad++, Explorer++ and LibreOffice for me an it's beautiful now. However, getting users to patch their msstyles and uxtheme is not a logical fix.

I am not a programmer. But what I am wondering is:

  • Is it possible (programmatically) to use another BUTTON image resource from within the same aero.msstyles file that is already loaded?

The only one that matches the same size and specifications is DarkMode::Toolbar (class) BUTTON (part) image.

But I am not a programmer and have no idea if that is a possibility or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants