Jump to content

Recommended Posts

Posted
3 hours ago, UEZ said:

This works for me. up/down control will be displayed when more tabs are added than it can be displayed.

I just tested it now and your fix works perfectly. Thank you so much. :)

Posted
On 4/13/2026 at 3:17 PM, WildByDesign said:

@bladem2003 I remember from the previous UDF thread that you use Windows 10 and wanted dark mode UpDown controls. Please give this release a try and let me know if it works well or not. Thank you.

 

Thank you. Works like a charm!!!

Posted

GUIDarkTheme 1.7.0:

  • Significant changes to the overall modern cohesiveness of the design and color choices
    • Improved default dark mode theme colors
    • Improved default light mode theme colors (finally!)
    • Fixed painting of control sizeboxes to perfectly match scrollbar background color
  • Added new function _GUIDarkTheme_SetCornerPref() to change window corners (rounded, squared, etc.)
    • Corner Preference submenu added to View menu with examples for corner preferences
  • Renamed all Global variables to follow UDF specifications and avoid collisions - thanks to @argumentum for suggestions
  • Renamed all functions to follow UDF specifications and avoid collisions - thanks to argumentum for suggestions
  • Removed some redundant subclassing by using some non-subclass methods
    • WM_CTLCOLORSTATIC and WM_CTLCOLOREDIT have been removed completely
    • WM_CTLCOLORLISTBOX has been moved into a custom subclass procedure
    • This way it will not interfere with any potential GUIRegisterMsg a user may have already

This is a pretty sweet release. Much more UDF-compliant. Much more beautiful design. 😎

I never put much time into making sure the Light mode theme looked nice before. Even though this is a "DarkTheme" UDF, I wanted to ensure fast and easy switching between dark mode and light mode. I feel like the Light theme produced from this UDF now is much better in comparison to any GUI and control default light themes from AutoIt defaults. With that being said, I still feel like I need to make more improvements to the light theme. So if there are any light mode users, please feel free to give some suggestions to improve the light theme.

Posted
23 minutes ago, xuankhanh1982 said:

The height of the "GUICtrlCreateTab" field is too small, preventing the text from displaying properly. Can you fix this?

Thanks for reporting. I just fixed the tab text from being clipped. Please try version 1.7.1 from the first post. Let me know if the issue is resolved for you. :)

Posted

GUIDarkTheme 1.8.0:

  • Added Windows 11 Materials submenu to the View menu (Windows 11 Build 22621 and higher)
  • Added CUSTOMDRAW buttons (optional) to support Windows 11 Materials
    • Relevant functions now have a $bFlatButtons boolean to enable these custom buttons
    • Custom buttons can be used without the Windows 11 Materials as well
  • Relevant functions now have a $iMaterial option for enabling Windows 11 Materials
    • Options: $DWMSBT_AUTO, $DWMSBT_NONE, $DWMSBT_MAINWINDOW, $DWMSBT_TRANSIENTWINDOW, and $DWMSBT_TABBEDWINDOW
  • Got Windows 11 Materials showing on statusbar without OWNERDRAW or subclassing
  • Added/updated function header information for the most important functions
Posted

GUIDarkTheme 1.9.0:

  • Improved the overall modern cohesiveness of controls
  • Improved the design and behavior of Edit/Input controls
  • Improved colors for ComboBox and fixed some related issues
  • Miscellaneous improvements to most controls

Since all of the functionality is working great now, the focus on this release is entirely on bringing the overall design together. Ensuring that all controls match each other appropriately in design.

By the way, try my new Edit/Input control design. I can't seem to stop clicking on them now. 😄

Posted (edited)

Is it possible to remove the white border on an edit control?

 

#include <EditConstants.au3>
#include "GuiCtrls_HiDpi.au3"
#include "GUIDarkTheme.au3"

$hGui = GUICreate("", 500, 600, -1, -1, BitXOR($GUI_SS_DEFAULT_GUI + $DS_SETFOREGROUND, $WS_MINIMIZEBOX))
$idEdit = GUICtrlCreateEdit("", 10, 10, 480, 571, $ES_AUTOVSCROLL + $WS_VSCROLL + $ES_READONLY, 0)
_GUIDarkTheme_ApplyDark($hGui)

GUISetState()

While 1
    Sleep(10)
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then Exit
WEnd

 

Screenshot_18.png

Edited by bladem2003
Posted
34 minutes ago, bladem2003 said:

Is it possible to remove the white border on an edit control?

That is interesting because I just had to do the same thing on another GUI project. I should probably make a function to make it easier to change colors. Or a simple option of border or no border.

But for now, I suggest a manual change that I just did for a project:

;                                       Customize Dark Mode Colors                  Customize Light Mode Colors
Global $__DM_g_iGuiBkColor,         $__DM_g_iGuiBkColorDark     = 0x191919,     $__DM_g_iGuiBkColorLight     = 0xFFFFFF
Global $__DM_g_iBorderColor,        $__DM_g_iBorderColorDark    = 0x3F3F3F,     $__DM_g_iBorderColorLight    = 0x3F3F3F

Change above to:

;                                       Customize Dark Mode Colors                  Customize Light Mode Colors
Global $__DM_g_iGuiBkColor,         $__DM_g_iGuiBkColorDark     = 0x191919,     $__DM_g_iGuiBkColorLight     = 0xFFFFFF
Global $__DM_g_iBorderColor,        $__DM_g_iBorderColorDark    = 0x191919,     $__DM_g_iBorderColorLight    = 0x3F3F3F

This will change the border color to match the color of the background. And therefore this will hide the white border.

I will try to make a function to change border for next release.

Posted

While we're at it...

When creating a child GUI, a white line will appear in the menu.

 

#include "GuiCtrls_HiDpi.au3"
#include "GUIDarkTheme.au3"


$hGui = GUICreate("", 500, 300, -1, -1)
GUISetState(@SW_SHOW, $hGui)

Local $idMenuFile = GUICtrlCreateMenu("File  ")
GUICtrlCreateMenuItem("Open", $idMenuFile)
GUICtrlCreateMenuItem("", $idMenuFile)
GUICtrlCreateMenuItem("Exit", $idMenuFile)

_GUIDarkTheme_ApplyDark($hGui)



$hGuiChild = GUICreate("Child", 200, 100, -1, -1, -1, -1, $hGui)

_GUIDarkTheme_ApplyDark($hGuiChild)

GUISetState(@SW_SHOW, $hGuiChild)

While 1
    Sleep(10)
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then Exit
WEnd

 

Screenshot_19.png

Posted
38 minutes ago, bladem2003 said:

When creating a child GUI, a white line will appear in the menu.

Thanks for reporting this. I have a fix for it now and will add the fix to the next release. :)

By the way, it is great that you share a reproducible code example with each issue. That is very helpful. Thank you for that.

Posted
38 minutes ago, argumentum said:

...in my screen it shows as it should. Please share more details ( resolution, scale, astrological sign of the monitor base on fabrication date, etc. )

Are you kidding me up?

My monitor resolution is fhd, 100% scale, astrological sign is Virgo and fabrication date November 5, 1955 (Back to the Future)😉

Posted

...we "software people" forget that all this runs on hardware. And presenting a complaint about how something looks on a monitor should present details of the monitor itself so that the developer can have a better picture of what might be different from his system, where everything worked just fine. 
Then again, you know how Virgo monitors tend to be. :P 
Changing that border painting color to red, might bring about a better picture of what's going on. Because the question is, is it off by a pixel, or is it not even painting ? .

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

Posted

GUIDarkTheme 1.9.1:

  • Added new function _GUIDarkTheme_CtrlBorderSet() to enable/disable control borders and/or active Edit control color
  • Fixed bug on resizable GUI where SBS_SIZEBOX/SBS_SIZEGRIP would be incorrectly positioned by 1 pixel after theme change
  • Fixed bug where white menu line was not getting overpainted when GUI contained any child GUIs
  • Minor fixes and improvements
Posted

@bladem2003 I made a function to easily disable the border color and also the active Edit box color strip at the bottom.

So if you just want to disable control borders:

_GUIDarkTheme_CtrlBorderSet(False)

If you also want to disable that blue strip at the bottom of an Edit control when it is active:

_GUIDarkTheme_CtrlBorderSet(False, False)

 

; #FUNCTION# ====================================================================================================================
; Name ..........: _GUIDarkTheme_CtrlBorderSet
; Description ...: Sets whether or not border is shown around controls or if Edit controls have active color on bottom.
; Syntax ........: _GUIDarkTheme_CtrlBorderSet($bShowCtrlBorder = Default, $bShowEditActive = Default)
; Parameters ....: $bShowCtrlBorder     - Boolean. True to show borders around controls, False to now show. Default is True.
;                  $bShowEditActive     - Boolean. True to show active color on Edit control, False not. Default is True.
; Return values .: None
; Author ........: WildByDesign
; Modified ......:
; Remarks .......:
; Related .......:
; Link ..........:
; Example .......: No
; ===============================================================================================================================
Func _GUIDarkTheme_CtrlBorderSet($bShowCtrlBorder = Default, $bShowEditActive = Default)
    If $bShowCtrlBorder = Default Then $__DM_g_bShowCtrlBorder = True
    If $bShowCtrlBorder <> Default Then $__DM_g_bShowCtrlBorder = $bShowCtrlBorder
    If $bShowEditActive = Default Then $__DM_g_bShowEditActive = True
    If $bShowEditActive <> Default Then $__DM_g_bShowEditActive = $bShowEditActive
EndFunc   ;==>_GUIDarkTheme_CtrlBorderSet

 

Posted
13 hours ago, argumentum said:

Changing that border painting color to red, might bring about a better picture of what's going on. Because the question is, is it off by a pixel, or is it not even painting ? .

#include <EditConstants.au3>
#include "GuiCtrls_HiDpi.au3"
#include "GUIDarkTheme.au3"

$hGui = GUICreate("", 500, 600, -1, -1, BitXOR($GUI_SS_DEFAULT_GUI + $DS_SETFOREGROUND, $WS_MINIMIZEBOX))
$idEdit = GUICtrlCreateEdit("", 10, 10, 480, 571, $ES_AUTOVSCROLL + $WS_VSCROLL + $ES_READONLY, 0)

$__DM_g_iBorderColorDark = 0xFF0000 ;  to debug the border
_GUIDarkTheme_CtrlBorderSet(True, False) ; new in v1.9.1.0

_GUIDarkTheme_ApplyDark($hGui)

GUISetState()

While 1
    If GUIGetMsg() = $GUI_EVENT_CLOSE Then Exit
WEnd

@bladem2003, if the border still wrong, share the pic. of this :) 

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

Posted (edited)

GUIDarkTheme 2.0.0:

  • Improvements to brushes and pens for better manageability, efficiency and cleanup
    • New internal functions for brushes: __GUIDarkTheme_CreateBrushes() and __GUIDarkTheme_BrushCleanup()
    • New internal functions for pens: __GUIDarkTheme_CreatePens() and __GUIDarkTheme_PenCleanup()
    • Brushes and pens are now easily cleaned up and recreated for any theme or material changes
  • Subclassing of ListView Headers has been added
    • Separate procedure function __GUIDarkTheme_ListViewProc() has been added
    • Headers are only subclassed when Windows 11 materials are applied
    • Special thanks to @Nine for the genius header subclassing technique
    • Special thanks to @jugador for important crash fixes for the header subclassing
  • Theme design improvements
    • UpDown received some improvements
    • Combobox received some improvements
    • Lots of theme color improvements for when Windows 11 materials are applied
    • Miscellaneous color adjustments throughout theme

A significant amount of work went into the overall refinement of the theme colors. Especially colors used when Windows 11 materials are applied to show the best effects. I had to pay close attention to being able to switch themes smoothly and also switching between Windows 11 materials.

For anyone with Windows 11 build 22621 or higher and has transparency effects enabled (generally default), please test Mica Alt (Tabbed) for me in the Sample GUI under View > Windows 11 Materials menu. Move the window around various areas of your screen to see if the effects are improved. Different wallpapers produce vastly different effects because that is mostly where the Mica effects are generated.

I have disabled Acrylic for now (in the Sample GUI only) because it looks terrible with the Sample GUI. Some GUIs do look decent with Acrylic. But definitely not all GUIs look good with it. Acrylic can still be applied with GUIDarkTheme UDF for any other GUIs if anyone needs it.

TODO:

  • Figure out how to make the unchecked checkboxes have a transparent background. That would improve the Win11 material effects
  • Unchecked checkbox transparent background is ready for next release (DONE)
Edited by WildByDesign
Posted

@mLipok @argumentum Over in the Global pen help thread that I created, we briefly discussed creating an option to have the GUI theme switch between dark and light modes automatically when a user switches between dark and light modes on their system.

I would like to implement something like that now as an option. I never did find a window message that broadcast the simple dark>light or light>dark mode change on a system. I tried many of them.

So I'm thinking, if the use enables this option, we can then start to poll the _WinAPI_ShouldAppsUseDarkMode() function every 1 second. There is a registry key as well that changes anytime a user switches between dark and light modes.

Is it more efficient to continuously check registry or check _WinAPI_ShouldAppsUseDarkMode?

Whichever is most efficient is likely what we should go with.

What is the best (safest) way to do this? AdlibRegister? _Timer_SetTimer?

Anyway, just wanted to start some conversation on this and figure out the best way to go about doing it since I can't find a window message that broadcasts it.

 

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