Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic support for Dark mode in Windows 10? #262

Closed
large opened this issue Nov 27, 2019 · 24 comments
Closed

Automatic support for Dark mode in Windows 10? #262

large opened this issue Nov 27, 2019 · 24 comments
Labels
Enhancement/Feature Request An Enhancement/Feature request by the community

Comments

@large
Copy link

large commented Nov 27, 2019

Is your feature request related to a problem? Please describe.
Not attached to a problem at all :)

Describe the solution you'd like
Make Open-Shell blend in with Windows 10 dark mode.

Describe alternatives you've considered
Skin "Smoke glass" is near darkmode but it is not as nice as the "Classic skin".
It is probably possible to get tune among all the options, but a simple "detect&set" function should be available?

Additional context
image

Option you want to check against: https://stackoverflow.com/questions/51334674/how-to-detect-windows-10-light-dark-mode-in-win32-application

@large large added the Enhancement/Feature Request An Enhancement/Feature request by the community label Nov 27, 2019
@clngr
Copy link

clngr commented Nov 30, 2019

This is a highly wanted feature - thanks for pointing out.

@XenHat
Copy link
Member

XenHat commented Feb 1, 2020

I'm all for this.

@bonzibudd
Copy link
Member

@CTVCAM8 Do you know if this would be possible with an existing Metro color?

@CTVCAM8
Copy link

CTVCAM8 commented Sep 23, 2020

Not a coder.
All I know is using $ApplicationText color in a skin for Main_Bitmap means the menu will be black with Light mode,
and white menu with Dark mode. It also lets through some glass color.
Even if there is an opposite color (white with Light mode or black with Dark mode)in the long list of Metro colors,
it's still going to let some color come through.

@bonzibudd
Copy link
Member

@CTVCAM8 I found something that might work: ApplicationText for text, combined with ApplicationBackground for the bitmap. This limits the color to be completely white or black but it will definitely work. The color override can be set to hex 808080, which will make sure the menu stays in greyscale. In fact, there could be a second color blended into the bitmap mask in order for the color to be more easily controlled.

@bonzibudd
Copy link
Member

Even better: SystemText and SystemBackground! That way it will match taskbar.

@bonzibudd
Copy link
Member

bonzibudd commented Sep 24, 2020

Ok, I made a very basic tweak of the metro theme to be based off of the Application background color: MetroAppBg.skin7

Only in Win7 style currently. May be slightly different in some other ways, I was experimenting with some other stuff. I could not get SystemBackground to work, there seems to be an issue with that one. In the CS utility, it shows up twice, and when I apply it to the skin, it stays black and does not conform to the taskbar color.

Edit: Forgot to mention, you should set the color override to hex 808080 so the metro color does not leak in.

Xenhat Edit: Fixed link

@XenHat
Copy link
Member

XenHat commented Sep 24, 2020

I can't get this to work.

@bonzibudd
Copy link
Member

@XenHat I had the wrong file uploaded before. Try downloading again.

@XenHat
Copy link
Member

XenHat commented Sep 24, 2020

nice
image

image

@bonzibudd
Copy link
Member

@large would you like to have a classic style for this?

@XenHat
Copy link
Member

XenHat commented Sep 24, 2020

I'm curious as if this is something that could be programmatically changed/loaded into the current skin instead of making duplicate skin versions

@bonzibudd
Copy link
Member

It could be, for the most part. You could use a skin option to override the accent color and text color, however the "Override glass color" cannot be set by the skin, which isn't very intuitive for a default skin. If the "Override glass color" option was fixed so it didn't need to be set manually, then it might be worth adding this to the current skin.

@XenHat
Copy link
Member

XenHat commented Sep 24, 2020

An option to enable following the OS theme could set that value automatically.

@bonzibudd
Copy link
Member

Ok, so I think a good scenario to do this would be: Define an option within the Metro skins called "BACKGROUND_COLOR". If Open-Shell detects this as being enabled, it should set the color override to "808080" so that the color does not leak in.

Alternatively, Open-Shell could provide the option in the "Menu look" tab, and it could have a value which the skins could take advantage of. The issue with this implementation would be that the skins could change the option to something completely different, which could get confusing.

If you think the first method would be doable, I can work on adding that option to both metro skins. I know that skins can call back to Open-Shell settings like if the Search bar is enabled, but I don't know if there's any cases of the other way around.

Also, I'm making a new issue related to this, because the correct color which should be used for this, $SystemBackground, seems to be defunct. The skin I supplied uses $AppBackground which will work in some scenarios, but will not be correct if the App and System modes are different from each other.

@bonzibudd
Copy link
Member

The latest build now has support for $ImmersiveSystemBackground! I will be working on additions of this for both Metro styles.

@bonzibudd
Copy link
Member

I thought of another solution. I think that a better option might be to add the ability for skins to set the color override to a custom color, within a like titled something like "Color_override". Just an idea.

@bonzibudd
Copy link
Member

System background color Metro skins (Not final)

Just made these 2 skins which use the System colors, instead of App colors. This makes sure that it always uses the Taskbar color. These 2 require the latest build from PR #468 since they use a newly added scheme for accessing Metro colors. These both have a toggle between the new color scheme and the old metro colors. Same deal as before with the color override.

Soon, I will be adding better colors to the submenus, scrollbar, search box, and pager arrows.

@itsdoreiku
Copy link

Would love to see some sort of implementation of this.

@large
Copy link
Author

large commented Oct 9, 2020

@large would you like to have a classic style for this?

Oh yes, the classic menu is the only choice on my windowboxes 👍
(Metro and all the "fancy" eyecandy are in my eyes waste of power).

When I checked a skin-file the Main_text_color is set to static colors, like Main_text_color=#000000.
Could a solution here would be to create variables for colors, so Main_text_color=$system_text_color$
And when that is established, you have access to $system_accent_color$, $system_text_complimentary_color$ etc, making skins dynamic based on what setup the Window user has without the need to edit the *.skin file.

That would be cool ;)

Maybe the skin-part should be revised to use GDI+ since you can draw with an alpha-channel? That would make bitmaps a thing in the past...

@bonzibudd
Copy link
Member

I've just made a significantly improved version of both the classic and 7 style skin for automatic dark/light: Metro_SystemBG_revA

I added the new colors to the sub-menu, and applied a color blend to make it look as native as possible. I also applied a similar blend to the selectors, which I think helps a lot with the look.

@itsdoreiku

This should solve your problem. Make sure you have the nightly build of Open-Shell installed, since this uses a newly added Immersive color switch. For best results you should set the glass color override to HEX 808080, which will blend a bit better with the Windows 10 taskbar.

@large

I haven't made anything yet, but if you want to experiment with it, you can mess around with the "$SystemText" for text and "$ImmersiveSystemBackground" for background. You will need to add a mask to the background, so that it can utilize the color. Also make sure you are on the new nightly build.

@ORIOLESFan02
Copy link

Any update(s) on this?

@BraINstinct0
Copy link

Since win10/11 now support native Dark/light mode switching, this seems like a very good option to implement. However, to make things simple, just adding two themes & applying the matching one seems like a viable option.

@bonzibudd
Copy link
Member

New default skin with immersive colors added in #1274.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement/Feature Request An Enhancement/Feature request by the community
Projects
None yet
Development

No branches or pull requests

8 participants