Jump to content

Recommended Posts

Posted

@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.

Posted (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.

image.thumb.png.ebb53f7ee973f59c2a4b51d8618e3103.png

Edited by WildByDesign
Posted

Hi I don't get the same result 

Can you post the GUIDarkMode.au3 you are using for DarkMode_DarkTheme 

Thanks

Posted (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 by WildByDesign
Posted
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.

Posted
6 minutes ago, argumentum said:

Will you share code to show how :baby:

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. 😱

Posted
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.

Posted

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:

image.thumb.png.c115a6755f2ba940eb06c5a6149e8fcc.png

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.

Posted

Hi everyone,


@WildByDesign

I Did Not follow up the Changes in Win11 25H2.  In fact, i just realized I'm still in 23H2, and my System would not find any Upgrades to higher versions.
Looks like I have to do a in-place upgrade or smth.

I’ll take a closer look at the changes for Windows 11 25H2, and many thanks for your improvements.
Although I don’t yet fully understand why the checkbox icons for the ListView are necessary.

Right now, I'm working on a v0.04 thanks to @argumentum great work with the preliminary implementation of text color in the ListView header, along with many other improvements.

@argumentum You are right about me hitting a wall, but it’s more that I’ve been hitting a wall in real life.
Back in early 2024, my sister had a motorbike accident and lost the love of her life. Since then, she was never the same again. The doctors didn’t recognize the signs quickly enough, which ultimately led to me losing her due to her severe depression.

As you can imagine, this threw me completely off track, and it took me quite a while to get fully back on my feet again.
To be honest, I had almost forgotten about this project, and I only remembered it recently while browsing through my Firefox bookmarks.

Anyway, I hope we can continue improving this project a bit. Even though there are already many great UDFs for Dark Mode, it’s still interesting to see how far we can push the W32 Dark Mode implementation.

Kind Regards,

NoNameCode

Posted
5 hours ago, NoNameCode said:

I’ve been hitting a wall in real life.

I feel you. Life can be a pain, literally.
I get "distracted" ( to give it a name ) with my aging body, and ADHD, and the fears that make me OCD. Topped with memory issues and, am a mess.
In others I got to identify when someone is going though things. Depression is one am painlessly familiar with. Painlessly because in the battle with it I lost the factors that makes it painful and by now I can know everything that ills the one going though depression but, there is nothing another can do when the one depressed chooses to either hide it, or not actively ask for help humbly.

6 hours ago, NoNameCode said:

remembered it recently while browsing through my Firefox bookmarks.

Is good to see you back.

As far as "the dark mode", the way is supposed to be: you choose a theme, and that's the theme. Period.
This per-program theme ?!?!. M$ is a ... misguided bunch, or a marketing genius that makes one exited because the next version will have a, less incomplete theme.

In my case, I use "after market" themes and that takes care of dark mode for me, in my PC.
When in a GUI, all controls that can be dark-moded, then I can offer dark mode, else, no dark mode ( say, GUICtrlCreateDate()  is used ).

Again, is good to see you back.

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...