WildByDesign Posted Thursday at 11:22 AM Posted Thursday at 11:22 AM @NoNameCode It's good to see you around. I wanted to thank you for everything that you did to create and share this UDF. I'm not sure if you've followed some of the dark mode changes with Windows 11 25H2 and higher. There are two dark themes in the msstyles/uxtheme which can be selectively applied (with _WinAPI_SetWindowTheme, I mean). There is DarkMode_Explorer as we know but also DarkMode_DarkTheme now. What I mean by selectively is that you could applied DarkMode_DarkTheme on some controls and DarkMode_Explorer on other controls. I ran the DarkMode_DarkTheme on all controls of the Sample Controls GUI and it's much better. A lot of the controls that had thick white lines bordering some controls are specifically much better. I am wondering if it is worth updating the UDF to detect 25H2 and have the ability to use the new dark theme. It's a shame that only 25H2+ users can use it. Now, while I say the majority of controls with DarkMode_DarkTheme are improved, it is quite possible that some are still being updated. They are still making changes to the aero.msstyles file with almost every monthly release. Actually I'm pretty sure that 24H2 users got it as well because it's essentially the same kernel and OS as 25H2.
WildByDesign Posted Thursday at 11:52 AM Posted Thursday at 11:52 AM (edited) Here is a quick example with the Sample Controls: DarkMode_Explorer (left) and DarkMode_DarkTheme (right) The Input box is much less blinding on the eyes plus a few others where the lines/borders are thinner and therefore less contrast. Progress is added with (only 24H2/25H2): Case 'msctls_progress32' $sThemeName = 'DarkMode_CopyEngine' EDIT: The box showing around the Slider control on both is just the focus rectangle. Edited Thursday at 11:55 AM by WildByDesign
jpm Posted Thursday at 12:35 PM Posted Thursday at 12:35 PM Hi I don't get the same result Can you post the GUIDarkMode.au3 you are using for DarkMode_DarkTheme Thanks
WildByDesign Posted Thursday at 12:37 PM Posted Thursday at 12:37 PM (edited) 5 minutes ago, jpm said: Can you post the GUIDarkMode.au3 you are using for DarkMode_DarkTheme Absolutely. You just have to run GuiDarkmodeApply($hWnd) with the handle of your GUI and it will run through all of the controls. GUIDarkMode_v0.02mod.au3 EDIT: If you are on a previous version of AutoIt you will need the following: Global Const $DWMWA_USE_IMMERSIVE_DARK_MODE = (@OSBuild <= 18985) ? 19 : 20 Edited Thursday at 12:40 PM by WildByDesign
jpm Posted Thursday at 02:13 PM Posted Thursday at 02:13 PM Thanks Just wondering why the header of the listview does not show in white?
WildByDesign Posted Thursday at 02:24 PM Posted Thursday at 02:24 PM 4 minutes ago, jpm said: Just wondering why the header of the listview does not show in white? That is one thing that was always problematic with dark mode on ListViews. It will make the background of the header dark but the text of the header stays dark which is no good. For that reason, I have always had to subclass the header for the ListView. I have always had to do tricks with TreeView/ListView checkboxes as well to show the dark mode variant of those. Microsoft still has a way to go, but it’s good to finally see them starting to put more resources into dark mode development. I didn’t think it would ever happen.
argumentum Posted Thursday at 02:28 PM Posted Thursday at 02:28 PM 3 minutes ago, WildByDesign said: For that reason, I have always had to... Will you share code to show how Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
WildByDesign Posted Thursday at 02:39 PM Posted Thursday at 02:39 PM 6 minutes ago, argumentum said: Will you share code to show how For sure, I will always share anything here. Technically, the subclass code likely came from these forums and I believe was about a decade ago, but still works. It may need to be modified now though since there seems to be differences between DarkMode_Explorer and DarkMode_DarkTheme for the header. I am on my iPhone right now but I will post it in about an hour. I ran out of my nice Colombian coffee yesterday and it seems to have thrown off my whole routine today. 😱
argumentum Posted Thursday at 02:43 PM Posted Thursday at 02:43 PM 2 minutes ago, WildByDesign said: I am on my "iPhone"... Well, shame on you for having to be explicit about the "iPhone" Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
jpm Posted Thursday at 03:13 PM Posted Thursday at 03:13 PM I found in my old testing on the subject I hope it is usefullGUIDarkMode-Jpm.zip t argumentum and WildByDesign 2
WildByDesign Posted Thursday at 03:36 PM Posted Thursday at 03:36 PM 17 minutes ago, jpm said: I found in my old testing on the subject I hope it is useful This looks great and works really well. Thank you so much. This is very helpful. @argumentum This is significantly better than what I was going to post. Mine used _LVWndProc as well but did not function nearly as well. @NoNameCode By the way, if you haven't seen the awesome dark mode subclassing that @UEZ did recently in this thread, you should check it out. It's definitely the most thorough when it comes to the dark mode subclassing efforts and the final outcome of the dark mode GUI visuals. argumentum 1
WildByDesign Posted Thursday at 05:15 PM Posted Thursday at 05:15 PM I was thinking that we need to also find a better method to get the dark mode checkboxes to show up in ListViews and TreeViews. Here is an example of one of my Windows security apps that I made a year or two ago: Here is the code that I used to make it: If $isDarkMode = True Then $hImageList = _GUICtrlListView_GetImageList($hCapabilitiesList, 2) _GUIImageList_Remove($hImageList) If @Compiled = 0 Then _GUIImageList_AddIcon($hImageList, "unchecked.ico") _GUIImageList_AddIcon($hImageList, "checked.ico") Else _GUIImageList_AddIcon($hImageList, @ScriptFullPath, 3) _GUIImageList_AddIcon($hImageList, @ScriptFullPath, 4) EndIf EndIf Here are the icons: checked.icounchecked.ico The icons are actually created from the built-in Windows dark mode checkbox resources and in the same DPI scaling resolutions. But that makes me wonder: Is it possible to pull ImageList resources from a checkbox? If we could pull the resources like that from a created (but hidden) dark mode checkbox, it might be better than having to attach icon files separately to a project. I am not quite as familiar with TreeView controls, but I would think that we can probably do something similar with ImageLists to get dark mode checkboxes.
argumentum Posted Thursday at 05:21 PM Posted Thursday at 05:21 PM Where is the 3rd state of a checkbox ( not checked nor unchecked ) ?, we're gonna need that icon too Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
WildByDesign Posted Thursday at 06:22 PM Posted Thursday at 06:22 PM 1 hour ago, argumentum said: Where is the 3rd state of a checkbox ( not checked nor unchecked ) ?, we're gonna need that icon too Oops. I forgot about that. Is that the one called "tristate" or something like that? argumentum 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now