DiscordMessenger / dm

Discord Messenger is a free Discord-compatible messaging client targeting both new and old Windows.
MIT License
813 stars 13 forks source link

Why not just have a toggle for dark mode? #71

Closed K4sum1 closed 2 months ago

K4sum1 commented 2 months ago

Why restrict it to modern systems and hook complex APIs? Why not just have a dark mode checkbox in settings?

iProgramMC commented 2 months ago

It occurs to me that you don't understand how Win32 works. Windows was never conceived with a dark mode in mind, therefore common controls (scroll bars, edit boxes, etc, of which we use plenty) can't be styled a different way from the one the active Windows theme allows.

There's no way to "just" add a check box for dark mode, if I only did that I'd have a dud that does nothing.

For Windows 7 and below you can just make a dark classic theme if you so desire.

K4sum1 commented 2 months ago

I guess that makes sense as you aren't using a toolkit. However I see options for adjusting Message Style and there are Flat Color settings. Are these just taken from different colors of the current theme?

iProgramMC commented 2 months ago

These are just colored based on the current theme indeed.

I could restyle the custom controls indeed, but I feel that it would look VERY out of place compared to the custom controls. Here's an example where I invert the colors of all the custom stuff (except profile pictures), and the main window's background:

image

iProgramMC commented 2 months ago

Checked out Abaddon's screenshots (you mentioned it in another issue), it looks nice but yeah I'm not using a toolkit such as Qt or GTK so I'm unable to use their dark mode features.

K4sum1 commented 2 months ago

Yeah, that makes sense.

RF7391 commented 1 month ago

Tbh if ppl want a dark theme they should use an msstyle to apply it instead of asking for one in dm

K4sum1 commented 1 month ago

For Windows 7 and below you can just make a dark classic theme if you so desire.

:​troll​: windows_8 1_dark_classic_theme

iProgramMC commented 1 month ago

That's pretty cool, how did you do that?

K4sum1 commented 1 month ago

The most jank way possible but it works really well. https://files.catbox.moe/pdns19.7z

When WinClassic is back online I also have the 7 network pane working too, should be one of the newest posts here. https://winclassic.net/thread/2222/windows-van-dll-running-21h2

Edit: VPN was being funny, switched and grabbed link. https://files.catbox.moe/8oq49e.7z

OrthodoxWindows commented 1 month ago

It occurs to me that you don't understand how Win32 works. Windows was never conceived with a dark mode in mind, therefore common controls (scroll bars, edit boxes, etc, of which we use plenty) can't be styled a different way from the one the active Windows theme allows.

There's no way to "just" add a check box for dark mode, if I only did that I'd have a dud that does nothing.

For Windows 7 and below you can just make a dark classic theme if you so desire.

Win32 supports the dark theme very well, but Microsoft is doing everything to prevent this. It would be enough to use another visual style (like in Windows XP, with the Luna, Olive and Metallic themes) to have a dark mode. This is what the Rectify11 team does. But Microsoft persists in advising the use (to add compatibility with an incomplete dark theme) of complicated APIs that are unsuitable for older applications. Fortunately, it is possible to use third-party visual styles, or the classic theme (because yes, as K4sum1 showed, it is possible to use the classic theme in modern Windows versions).

iProgramMC commented 1 month ago

Win32 supports the dark theme very well,

No, it doesn't support the dark theme. It supports any kind of theme you throw at it.

I don't understand why Microsoft is hiding theme settings so hard. "Muh compatibility" is not a reason.

Additionally, the only reason Win32 even has dark mode interfaces at all is because they don't want to rewrite Windows Explorer using the newest WinUI APIs. If they did that, we probably wouldn't have any kind of dark mode API at all.

Because they only added a "dark mode" for Windows Explorer, we would have to do some ungodly hacks to get dark mode in Discord Messenger. And it wouldn't be complete. For example, whatever we do, I don't think we can make DrawEdge use dark theme colors.

Not only would we need to apply a custom theme to all common controls, we'd also need to hook into GetSysColor, which is super duper nasty.

All in all, Microsoft and its Win32 dark mode support sucks. They claim it's for "compatibility", but really it's just an excuse to get you to use their latest APIs.

OrthodoxWindows commented 1 month ago

No, it doesn't support the dark theme. It supports any kind of theme you throw at it.

I don't understand why Microsoft is hiding theme settings so hard. "Muh compatibility" is not a reason.

Additionally, the only reason Win32 even has dark mode interfaces at all is because they don't want to rewrite Windows Explorer using the newest WinUI APIs. If they did that, we probably wouldn't have any kind of dark mode API at all.

Because they only added a "dark mode" for Windows Explorer, we would have to do some ungodly hacks to get dark mode in Discord Messenger. And it wouldn't be complete. For example, whatever we do, I don't think we can make DrawEdge use dark theme colors.

Not only would we need to apply a custom theme to all common controls, we'd also need to hook into GetSysColor, which is super duper nasty.

All in all, Microsoft and its Win32 dark mode support sucks. They claim it's for "compatibility", but really it's just an excuse to get you to use their latest APIs.

I totally agree. In any case, Microsoft would only need an "aerodark.msstyle" to have a perfect dark theme. It is therefore clear that Microsoft deliberately does not want this.

K4sum1 commented 2 days ago

I noticed HTTP Downloader doesn't seem to have any big toolkit and I can adjust the color for basically everything in it. Whatever it uses is also compatible with XP too. Maybe you could give it a look?

https://github.com/erickutcher/httpdownloader/releases

ScreenShot_20240721142952

iProgramMC commented 1 day ago

That about dialog box is clearly not from XP, it looks like you're using some kind of realistic XP mod such as Windows eXPerience. Try again.

The gist of it is this: If you want dark mode, set your system to dark and enjoy. Discord Messenger will happily drum along with whatever theme you throw at it.

Here's a demo: VirtualBox_Windows XP_22_07_2024_23_07_32

K4sum1 commented 21 hours ago

That about dialog box is clearly not from XP, it looks like you're using some kind of realistic XP mod such as Windows eXPerience. Try again.

ScreenShot_20240722193342