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

Native VS-like Dark Theme Support [Live screenshot included] #63

Open
NazmusLabs opened this issue Apr 10, 2018 · 20 comments
Open

Native VS-like Dark Theme Support [Live screenshot included] #63

NazmusLabs opened this issue Apr 10, 2018 · 20 comments

Comments

@NazmusLabs
Copy link
Contributor

windows 3 1 file manger true color on dosbox ss1804

Due to the flexibility of Windows 3.1 personalization control panel, I am able to re-color almost all standard Windows UI controls, including changing the color of highlights and shadows, allowing me to create a "flat", modern, dark theme. I used the UI colors of Blend for VS2017 and the highlight color of VS2017 to create a dark theme for Windows 3.1, which also applied to WinFile.

This screenshot is a live example (i.e. not photoshopped or concept art) showing WinFile sporting a dark theme. This can be used as reference to re-color the standard Windows components at the application level, which Windows 10 still supports.

Because WinFile uses native UI controls, it technically supports a dark theme color. And applications themselves can still apply their own color to these classic Windows UI components, including buttons, textboxes, etc (as long as they are not using a visual style, which WinFile isn't). So, it's not inconceivable that we would eventually be able to re-color the UI easily and without major modifications or re-skin to create the dark theme. The live screenshot is living proof that it works well with WinFile.

@T8z5h3
Copy link

T8z5h3 commented Apr 10, 2018

looks great except for the issues note about the buttons.

@NazmusLabs
Copy link
Contributor Author

NazmusLabs commented Apr 10, 2018

Actually, most buttons in Windows 3.1 supports dark theme. The reason the drive button looks so bad here is that WinFile decided hard code the button highlights & shadows and used bitmaps for the icon. That's why I always prefer using as much native UI as possible. It keeps things future proof and allows better theming support down the line.

Here's how a button is supposed to look had it been created natively. The confirmation settings uses native controls, and, therefore, it correctly supports the dark theme. Notice that it looks flat, as I removed the highlight & shadow color to give Win31 a modern look.

windows 3 1 file manager dark theme dosbox ss1801

@T8z5h3
Copy link

T8z5h3 commented Apr 10, 2018

i like it

@Anixx
Copy link

Anixx commented Apr 10, 2018

So, what's the problem? Use the theme which you like.
clipboard_20180410

@NazmusLabs
Copy link
Contributor Author

NazmusLabs commented Apr 10, 2018

@Anixx In this case, you had to change your entire OS colors, which, Windows 10 and 8 doesn't support by default (and will ruin the look of other apps if you do it manually through reg edits). This thread is about an application specific color. Each app can, if they want to, recolor the standard Windows UI component for that app only, allowing you to always have a particular app to have a particular color, regardless of the color the OS is using. Windows 10 supports this behavior. This only applies to the "classic theme" controls, which the WinFile is using.

P.S. notice how Windows 3.1's flat design allows the UI to be a lot more cleaner and less distracting without all the bevels, emboss, outlines, letting you focus on the content. Which is why I love modern UI paradigms.

@T8z5h3
Copy link

T8z5h3 commented Apr 10, 2018

windows 10 does have a dark mode

@ZanderBrown
Copy link

@T8z5h3 for UWP apps and only if they haven't disabled support

This is the good old days of Win32 (well Win16) where you could change the colour and font of basically everything in the system and applications would respect it. Unfortunately the native controls where somewhat limited and complex to use (and remained like that until WinForms) so applications and even parts of Windows itself moved to custom toolkits that were easier to work with (see Office or Media Player) and as such support was largely dropped

@T8z5h3
Copy link

T8z5h3 commented Apr 10, 2018

i do remember that

@NazmusLabs
Copy link
Contributor Author

NazmusLabs commented Apr 10, 2018

@ZanderBrown it's not for UWP only. Win32 apps can add support the lite/dark mode switch as well very easily. They just need to manually "supply" their own theming. Just take a look at paint.net. It now has a dark mode that honors Windows 10's mode setting and can be set to dynamically switch based on the settings app or be set to always be dark or lite. But the software author had to manually design the look of the dark mode.

This won't be problem for WinFile, as, like I noted earlier, the app mostly uses native Windows controls, which has built in support for re-coloring. And a specific theme can be applied based on whether the lite or dark mode is set.

It's also why I love the XAML UI system used by UWP apps, which was built with customization in mind. By default, the buttons are a gray square, but you can modify the native controls any way you like without building custom controls that may or may not benefit from future changes in the OS.

@Amaroq-Clearwater
Copy link

Amaroq-Clearwater commented May 8, 2019

@NazmusLabs
I welcome these changes. There are a few other repositories which may interest you in relation to this:

The first is an example application using the Dark Mode API introduced in Windows 1809, and the bottom is a library which was created to make UWP-based UI elements easier to implement in Win32 code.

@hbjydev
Copy link

hbjydev commented May 9, 2019

Was that screenshot built on Win3.1? Because if not I really want that window style DX

@NazmusLabs
Copy link
Contributor Author

NazmusLabs commented May 12, 2019

@heydennyyy yup, it was built on vanilla Windows 3.1 using the built in control panel settings to change color schemes

@OrthodoxWindows
Copy link

OrthodoxWindows commented Jun 25, 2022

Another solution is to create a personalized dark visual style. Like that, all Win32 applications will support the dark mode.
The main problem is that the way Microsoft manages visual style is absurd; Instead of creating a separate "dark mod" visual style, Microsoft stupidly persists in creating a "dark mod" inside the "light" visual style, which most Win32 programs cannot take care of.

nptr/msstyleEditor#74

@pamochi
Copy link

pamochi commented Dec 10, 2023

@Anixx If you could explain how you got that theme to work with winfile, it would be greatly appreciated. Been looking around but haven't seen much and @NazmusLabs explanation for your post wasn't all to helpful

@Anixx
Copy link

Anixx commented Dec 10, 2023

@Anixx reggarding colors, it simply works, picking the colors from the system, you do not need to do anything.

@pamochi
Copy link

pamochi commented Dec 10, 2023

@Anixx reggarding colors, it simply works, picking the colors from the system, you do not need to do anything.

I have my system colours set to grey and in the dark theme. Is there some directory your put the win file folder directly that could determine this. Right now I just have it in my program files folder, but maybe putting it in %system% could make the dark theme work

@Anixx
Copy link

Anixx commented Dec 10, 2023

It does not depend on directory, it depends on the system colors in your registry. For instance:
colors.reg.txt

@pamochi
Copy link

pamochi commented Dec 10, 2023

@Anixx I see what you mean. I assumed the default windows personalization would do this, but it seems not. It would be nice to be able to selectively control the controls for the apps as these edits mess with some of my other apps looks, but thanks for the help

@Anixx
Copy link

Anixx commented Dec 10, 2023

You can change all the colors in the system, including those not included in UWP settings app using WinPaletter.

@pamochi
Copy link

pamochi commented Dec 10, 2023

Just got the time to mess with WinPaletter, definitely a great tool for customization, so thank you for recommending it. There were two elements I still couldn't manage to change that I noticed you did, I attached a photo with those elements drawn over in red, if you had any idea. I took your reg file and imported it as well as tried winpaletter to alter these, though I could just be missing something
Screenshot 2023-12-10 162933

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants