Windows Darkmode color issue

I noticed the color used for Windows, when Dark Mode is enabled, is full black (&c00000000)
But Windows 10 and 11 uses dark grey (closest is &c11111100)

Basically the black top edge is too black, which makes the whole look unattractive.

Two questions:

  • Why did Xojo Inc choose &c000000 as the color? Because Windows 10 and 11 uses dark grey for all apps (reference point is Microsoft apps).
  • Is there a way to choose your own color?

If itā€™s drawing in the wrong colour Iā€™d recommend a feedback case. Unfortunately (for this instance) Iā€™m not a windows user so not sure what colour I should see.

1 Like

When i go wo windows 10 personal settings on light mode i get a as white as it gets background on the windows settings page and when on dark mode itā€™s 100% black in the windows settings page. So iā€™m not sure where you get that windows should be using a non black (around &c11111100) value ?

I am 100% for sure it is the case for Windows 11.
I thought Windows 10 would be the same, but I have to double check that.

You said WINDOWS 10 and 11 ?

On my Windows 10, it is full black, but on my Windows 11, it is dark grey and Xojo apps look dated and unattractive.

3 Likes

Here is a screenshot for Windows 11
The above is made with Xojo
The bottom is a default WIndows 11 app.

I would also like to add that when the windows is disabled, the correct grey color is shown.
But for Windows 11, there is no difference in the color for activated and deactivated windows.

Please fix this. It makes Windows darkmode awful in Windows 11 (and maybe Windows 10 too - not sure about that though)

2 Likes

If ā€˜Black Top Edgeā€™ refers to the TitleBar, (ā€˜Untitledā€™) you realise that Xojo doesnā€™t control that?

The Photos app below is not using a Win32 titlebar.
(You can tell because of the OneDrive icon that is showing next to the window controls)
Itā€™s probably using one of the many other GUI toolsets.
While Xojo uses Win32 controls, a Xojo app is going to look like a Win32 app, not a WPF or UWP based one.

ā€˜Windows 10 and 11 uses dark grey (closest is &c11111100)ā€™

Good luck with that.
There are lots of different ā€˜dark modesā€™ /themes that people have used.
The fact that it is dark at all is a step forward.

Did you try to ā€œpaintā€ the background color or set hasBackgroundColor to true and set a backgroundcolor ?
Also make a FB report please

If I remember correctly, to get the titlebar to color properly, I had to use an API call as the application was initializing. Iā€™ll dig through my code and see if I can pass something along to @William_Yu .

1 Like

Some info to the colors used:

Itā€™s not a color function. You set a theme aware flag.

Iā€™ve passed some info along to William and he said heā€™ll take a look.

2 Likes

Yes, Win32 officially does not have a dark mode but Xojo uses a hack/trick to color the border. So they can use any colour they want.

Basically they should use a different color when running on Windows 11 (slightly dark grey instead of black).

1 Like

To be clear, the Windows File Explorer and various other MS Windows apps are still Win32 based on Windows 10. However, in Windows 11 theyā€™ve moved a lot of their apps to WinUI. The difference can be seen with their titlebar appearance as noted. They just havenā€™t bothered to update their Explorer theme for Win32 apps. Please file a Feedback case if you want us to do something about that ourselves, or wait for our transition to WinUI.

<https://xojo.com/issue/66969>