adventuregamestudio / ags

AGS editor and engine source code
Other
696 stars 159 forks source link

Editor: support Dark Mode Titlebar in Windows 10 #1968

Open ericoporto opened 1 year ago

ericoporto commented 1 year ago

Describe the problem Currently AGS Editor Title Bar is white on Windows 10, I would like it to be black, because it would look nicer when I am using a Dark Theme.

Suggested change Add some option somewhere that allows me turning the Editor Title Bar in the Window dark mode variant.

I have a way to enable this here

https://github.com/ericoporto/ags/commit/86d09fcf4204c0324a28cfc0fe43e64461228dd3

additional context

https://learn.microsoft.com/en-us/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute

DWMWA_USE_IMMERSIVE_DARK_MODE Use with DwmSetWindowAttribute. Allows the window frame for this window to be drawn in dark mode colors when the dark mode system setting is enabled. For compatibility reasons, all windows default to light mode regardless of the system setting. The pvAttribute parameter points to a value of type BOOL. TRUE to honor dark mode for the window, FALSE to always use light mode.

This value is supported starting with Windows 11 Build 22000.

ericoporto commented 9 months ago

There is some work by @AlanDrake that looks promising here

https://github.com/AlanDrake/ags-draconian/commit/5dc2422a33c0a1803afbe576fdfa5c3f40e3f886