argumentum Posted February 17 Posted February 17 4 hours ago, WildByDesign said: But it may still fizzle out and not make it across the finish line because it is a lot of work. And I may need some help with some parts of it. You just do what you envision and we'll pitch in whatever you feel stuck WildByDesign 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
WildByDesign Posted February 18 Posted February 18 I am making some significant progress. I've got most dark theme stuff done and also the option to apply light theme is done as well. I am hoping to release something to test later today. Some good news. MS has finally fixed some of the long standing issues. For example, a simple checkbox would never change the text color before. So we always had to remove the theme and go with the classic look to change that text color associated with the checkboxes. It was so terrible looking. Now, the text color changes appropriately when applying the older DarkMode_Explorer and the newer DarkMode_DarkTheme. More positive stuff. Radio buttons and group text was always an issue as well. MS has fixed that with the newer DarkMode_DarkTheme and it looks awesome. Unfortunately they did not fix it in DarkMode_Explorer though. No matter what, we are going to get the best dark mode visuals and experience on the latest Windows 11 24H2/25H2 builds 26100.6899 and higher. Basically either 24H2 or 25H2 with the latest Windows updates are going to have the best experience. I am putting code in place for older Windows builds to fix some things to get the best experience possible on those older builds. Menubar top menu is going to be more difficult because it is so much more complex and I have to figure out a way to do it that makes it easier for whoever uses the UDF. This definitely wont be available in the first test release.
WildByDesign Posted February 18 Posted February 18 @argumentum This has remarkably surpassed my expectations so far. I didn’t think that I could do it. But I did and it’s really, really good. I was able to automatically detect specific controls that need extra subclassing and (if they exist) magically initiate any extra subclassing without the user of the UDF needing to do any of that. I will definitely need help making sure that the UDF is worthy of being a UDF and that it is well organized and proper. If you or anyone else does intend to help, should I put it up on GitHub or just pass it back and forth in forum posts?
argumentum Posted February 18 Posted February 18 (edited) 29 minutes ago, WildByDesign said: 1) @argumentum This has remarkably surpassed my expectations so far. I didn’t think that I could do it. But I did and it’s really, really good. 2) If you or anyone else does intend to help, should I put it up on GitHub or just pass it back and forth in forum posts? 1) With my sociologist hat on, I'll say that most limitations in intelligence are basically emotional. Happy to see that you discovered that you can 2) With my GitHub hat..., I don't think I have one of those 🤷♂️ But if you build it they will come. Do it here, there, it don't matter. Open up your heart code and let people in Edited February 18 by argumentum WildByDesign 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
WildByDesign Posted February 18 Posted February 18 (edited) This should get the party started for version 0.1 of GUIDarkTheme UDF. EDIT: Removed older UDF. EDIT: Please keep in mind that the best experience is always going to be on Win11 24H2/25H2 (builds 26100.6899 and higher) since MS is actively (for once in a decade) developing their dark mode theme resources. This will fallback to the previous dark theme if your build is lower. Edited February 21 by WildByDesign argumentum 1
argumentum Posted February 18 Posted February 18 ...looks structured and the examples look good. I can not read the code because IRL am overloaded with work, but I'll read the code and discern it, to give you any input that I may see worth noting if I encounter one. If you have any questions, post them for anyone to read it and offer a way about it WildByDesign 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
WildByDesign Posted February 18 Posted February 18 14 minutes ago, argumentum said: If you have any questions, post them for anyone to read it and offer a way about it I do have a question about the mini popout calendar. It's not a huge deal because I doubt that many users use that control, but my mini calendar popout shows a thin white border-like line around it in dark mode. I used the code from you and @UEZ for that. The SampleControls.au3 in Dark Mode example that I borrowed that code from does not have that thin white line around it. Do you have any idea what could cause it?
WildByDesign Posted February 21 Posted February 21 (edited) Here is version 0.2 of GUIDarkTheme UDF. EDIT: Removed UDF, added newer version in more recent post. There was an issue where not all Combobox dropdowns were being colored for dark mode. The Combobox dropdown in SampleControls was being colored properly. But the Combobox in @Nine's Search Content was not properly coloring the drop down. All fixed now. Edited Monday at 04:50 PM by WildByDesign argumentum 1
argumentum Posted February 21 Posted February 21 On 2/18/2026 at 1:58 PM, WildByDesign said: ...example that I borrowed that code from... ...any idea what... hmm, no, not really. I'd have to get into it but I have too much on my hands to get deep into it. But in the art of copy'n'paste, we get the gist of it, and not the "verbatim". Is not copy and paste all the time. For example: "C:\Program Files (x86)\AutoIt3\Examples\". Why !?. GUICtrlSetImage($idPic, "C:\Program Files (x86)\AutoIt3\Examples\GUI\logo4.gif") ; this may fail GUICtrlSetImage($idPic, StringLeft(@AutoItExe, StringInStr(@AutoItExe, "\", 0, -1) -1) & "\Examples\GUI\logo4.gif") ; this is better 3 hours ago, WildByDesign said: ...But the Combobox in @Nine's Search Content was... I too use that and tested your implementation, and is good, very good. Thanks WildByDesign 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
WildByDesign Posted February 21 Posted February 21 7 hours ago, argumentum said: But in the art of copy'n'paste, we get the gist of it, and not the "verbatim". Is not copy and paste all the time. For example: "C:\Program Files (x86)\AutoIt3\Examples\". Why !?. Good point. We need to cover and non-standard install locations or potential portable locations and so on. I ended up going with the following: ; set working directory to the original SampleControls example which contains the necessary resources FileChangeDir(StringLeft(@AutoItExe, StringInStr(@AutoItExe, "\", 0, -1) -1) & "\Examples\GUI") Thanks for that line. Very efficient. 7 hours ago, argumentum said: I too use that and tested your implementation, and is good, very good. Thanks That means a lot, thank you. I use that Search Content script almost daily. So a smooth dark mode was important for me. By the way, in the next release I am integrating your wonderful GuiCtrls_HiDpi script so that the SampleControls are sharp and appropriately sized. I'm not integrating it into the UDF though since that is just for theming. But the SampleControls really needed it. I fixed GuiCtrls_HiDpi so that it works on 64-bit as well. argumentum 1
WildByDesign Posted Sunday at 02:38 PM Posted Sunday at 02:38 PM (edited) Coming soon in GUIDarkTheme 0.3: Fully working dark mode checkboxes for TreeView (TVS_CHECKBOXES) and ListView (LVS_EX_CHECKBOXES) that match the dark mode checkboxes for the regular checkboxes. All automatic. EDIT: We could probably do radio buttons this way as well as long as they utilize image lists. Edited Sunday at 02:40 PM by WildByDesign argumentum 1
argumentum Posted Sunday at 04:10 PM Posted Sunday at 04:10 PM I have an 16k monitor ( in the future, maybe in 2035 ) and will this work with such ? ( never too early to future proof ? ) To be fair, science may discover a way to use the fascia to neuro connect with the brain and a chip no bigger than a grain of rice will be the device and the body will be the interface riding the need of a battery or screen from the device. So AutoIt may need a port to run on a NLPU ( neuro linear processing unit ( that will be the name )) and there is no way to futureproof that 🤪 WildByDesign 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
WildByDesign Posted Sunday at 04:55 PM Posted Sunday at 04:55 PM 35 minutes ago, argumentum said: I have an 16k monitor ( in the future, maybe in 2035 ) and will this work with such ? ( never too early to future proof ? ) That is a good way to think. Ahead. I am using Windows resources directly from the Aero.msstyles theme file. I have it set to get the current window DPI and automatically use the image resource that matches the specific DPI. I am pretty sure that most of their resources go up to either 400 or 800 scaling but I don’t recall specifically. Ultimately it will be dependent on MS adding the image resources as the years go by and technology improves. But from my understanding, the msstyles technology is right at the edge of its limits. If the memory size of the Aero.msstyles (or other msstyles) go up another 100Kb or something like that it will actually fail to load the theme. Obviously msstyles tech is like 20+ years old. So my guess is that they will have to come up with an entirely new theming engine because those current limitations will not work much longer. argumentum 1
WildByDesign Posted Monday at 04:49 PM Posted Monday at 04:49 PM (edited) GUIDarkTheme 0.3: Added dark mode checkboxes for ListView and TreeView controls Added high DPI scaling via GuiCtrls_HiDpi courtesy of @argumentum Fixed issue with older DarkMode_Explorer not showing proper text color for radio buttons and group box DarkMode_DarkTheme does not have this issue and therefore 24H2/25H2 will have better dark mode EDIT: UDF removed. Adding updated UDF in new post. Edited Wednesday at 11:50 AM by WildByDesign argumentum and bladem2003 2
argumentum Posted Monday at 08:20 PM Posted Monday at 08:20 PM (edited) ... #Region LABEL Local $idGreenLabel = _HiDpi_GUICtrlCreateLabel("Green" & @CRLF & "Label", 350, 165, 40, 40) GUICtrlSetTip(-1, '#Region LABEL') GUICtrlSetBkColor(-1, 0x006600) ; make the green color darker for the darker theme... ;GUICtrlSetBkColor(-1, 0x77FF77) ; ( lighter for the light theme looks better too ) #EndRegion LABEL ... ;~ GUICtrlSetColor($idGreenLabel, 0x000000) ; ..that way the text will be readable ... Looking good Edited Monday at 08:26 PM by argumentum WildByDesign 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting.
WildByDesign Posted Monday at 09:08 PM Posted Monday at 09:08 PM Fully automated dark mode top-level menubar is almost complete. I made it so that you can just add the one line to any old script with a menubar and it will detect everything automatically, switch to ownerdraw, color, etc. argumentum 1
WildByDesign Posted Wednesday at 12:01 PM Posted Wednesday at 12:01 PM (edited) GUIDarkTheme 0.4: Updated tab control subclassing courtesy of UEZ Automatic dark mode color for menubar Only works with menubar created with GUICtrlCreateMenu Menubar created with _GUICtrlMenu_CreateMenu does not currently work Includes painting over white line in non-client area For the dark mode menubar coloring, I basically stripped down the older ModernMenuRaw of things that were no longer needed. I replaced the WM_DRAWITEM and WM_MEASUREITEM with the much better implementation from UEZ. The previous implementations used an offset for the positions which was not always accurate. So I automatically obtain the menu text and CtrlID's to always set the proper position (largely has to do with measuring of text and drawing the proper text in the proper menu) for the menu subclassing. This is all pretty nice and automated for dark mode GUI lovers. But there is more to do. Edited 9 hours ago by WildByDesign argumentum and bladem2003 2
WildByDesign Posted Thursday at 12:08 PM Posted Thursday at 12:08 PM (edited) GUIDarkTheme 0.5: Automatically subclassing menubars created with _GUICtrlMenu_CreateMenu() and GUICtrlCreateMenu() now (thanks to @Nine) High DPI adjustments for top-level menu item width For the High DPI measurements of the top-level menu items, I was only able to test up to 175% scaling on my machine. If anyone has a monitor with 200% scaling or higher, could you please test the various scaling percentages? Essentially, we don't want too much space at the end of each top-level menu but most importantly we don't want any of that top-level menu text being cut off on the menubar. So please let me know. The relevant code in GUIDarkMenu.au3 is in the WM_MEASUREITEM function: ; Set dimensions with padding (with high DPI) Switch $iDPI Case 100 $t.itemWidth = $iTextWidth Case 125 $t.itemWidth = $iTextWidth - (4 * 1) Case 150 $t.itemWidth = $iTextWidth - (4 * 2) Case 175 $t.itemWidth = $iTextWidth - (4 * 3) Case 200 $t.itemWidth = $iTextWidth - (4 * 4) Case 225 $t.itemWidth = $iTextWidth - (4 * 5) Case 250 $t.itemWidth = $iTextWidth - (4 * 6) Case 275 $t.itemWidth = $iTextWidth - (4 * 7) Case 300 $t.itemWidth = $iTextWidth - (4 * 8) Case 325 $t.itemWidth = $iTextWidth - (4 * 9) Case 350 $t.itemWidth = $iTextWidth - (4 * 10) Case 375 $t.itemWidth = $iTextWidth - (4 * 11) Case 400 $t.itemWidth = $iTextWidth - (4 * 12) Case Else $t.itemWidth = $iTextWidth - 5 EndSwitch $t.itemHeight = $iTextHeight + 1 Also, if you have a better way to do that mathematically, please let me know. I tried with the scaling factors (eg. 1, 1.25, 1.5, etc.) but had no luck. I was trying for something in 1 line such as: $t.itemWidth = $iTextWidth - ($iDPI * something) But I couldn't figure out anything mathematically that worked out for all scaling factors. Edited 9 hours ago by WildByDesign
water Posted Thursday at 12:24 PM Posted Thursday at 12:24 PM Select Case $iDPI >= 100 and $iDPI <= 400 $t.itemWidth = $iTextWidth - ($idPI-100)/25 Case Else $t.itemWidth = $iTextWidth - 5 EndSelect WildByDesign and SOLVE-SMART 1 1 My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
SOLVE-SMART Posted Thursday at 12:33 PM Posted Thursday at 12:33 PM (edited) Ha funny @water, I had basically the same idea. Here my approach a bit differently: $t.itemWidth = _CalcMenuItemWidth($iDPI, $iTextWidth) Func _CalcMenuItemWidth($iDPI, $iTextWidth) If $iDPI < 100 Or $iDPI > 400 Then Return $iTextWidth - 5 EndIf Local Const $iSteps = Int(($iDPI - 100) / 25) Return $iTextWidth - (4 * $iSteps) EndFunc Best regards Sven Edited Thursday at 12:40 PM by SOLVE-SMART WildByDesign 1 ==> AutoIt related: 🔗 Organization AutoIt Community, 🔗 GitHub, 🔗 Discord Server, 🔗 Cheat Sheet, 🔗 autoit-webdriver-boilerplate Spoiler 🌍 Au3Forums 🎲 AutoIt (en) Cheat Sheet 📊 AutoIt limits/defaults 💎 Code Katas: [...] (comming soon) 🎭 Collection of GitHub users with AutoIt projects 🐞 False-Positives 🔮 Me on GitHub 💬 Opinion about new forum sub category 📑 UDF wiki list ✂ VSCode-AutoItSnippets 📑 WebDriver FAQs 👨🏫 WebDriver Tutorial (coming soon)
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