Refactor theme collection handler#1209
Conversation
With proper checks, because the name is not simply stored in the file, for Windows built-in themes
883b9b6 to
51d22ba
Compare
|
Nice PR! Respond quickly to Issues!
No, this part of the code is incorrect, because all three variables correspond to complete paths, not file names. You can use NameUnmanagedLightTheme instead, and add a NamePathManagedTheme for PathManagedTheme, which can avoid hard coding.
I think it's a good idea. In the case of multi-theme files, you can quickly find the theme files you want.
As far as the current changes are concerned, it should not affect the compatibility of Win10, because as far as I know, Win11 has little change in theme compared with Win10. (In the next few days, I can't use the computer for personal reasons, so Jay, I can't help you change this PR, I can only look at it. (;´д`)ゞ) |
|
EnumerateFiles always returns full paths, not just filenames. So the safety thing would be to compare paths against paths, right? Also be using |
focus on paths in Lib\Helper
841965b to
1f69bff
Compare

fixes #1208
Refactored the handler to search for .theme files, also in the Windows Themes folder.
Note that the
DisplayNameis not a friendly string inside the built-in Windows themes, so I used a look-up table to connect the strings from resources.Moved the InjectWindowsThemes code into the larger code block.
✔️ Somebody check if this is correct:
Because a different part
usesused "NameUnmanagedLightTheme"❓ Question: should we (alphabetically) sort the final list?doneNote
I don't use Windows 10 anymore, so would be great if somebody could test that!
Screenshot? Sure!