-
-
Notifications
You must be signed in to change notification settings - Fork 348
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
[Feature] Dark mode #2881
Comments
I'm not sure on the Windows side of things, but on Linux Mono took the active GTK theme, so a dark theme was possible (and indeed used by me and @HebaruSan and maybe others). I think Windows added some darkmode functionality in the last couple of updates, but I don't know if it is only for UWPs or if you can somehow use it in .NET apps too, or if it was only for their preinstalled UWPs (like the Settings). |
As stated, the loss of dark mode on Linux is a Mono issue (presumably an unintentional bug), but we've helped them fix things before. Investigation notes for that:
So it looks like the implementation of |
## Background In Mono 5 and earlier, the active GTK or KDE theme would be sourced for system colors, allowing dark themes to be obeyed: ![image](https://user-images.githubusercontent.com/1559108/69486043-f3bf0500-0e0c-11ea-9b29-1654ba4e6d9a.png) This allowed WinForms apps to blend in and look more like native apps. ## Problem In Mono 6, this capability was lost (as noted in passing in #14325). WinForms apps now only look like this, regardless of the system color settings: ![image](https://user-images.githubusercontent.com/1559108/69486114-dccce280-0e0d-11ea-8107-fe1653b2d816.png) This looks somewhat jarring and worse than previous Mono releases, for users with a dark system theme. ## Cause During load of the system settings (in the static constructor of `X11DesktopColors`), `Theme.SetSystemColors` passes system color data to `System.Drawing.KnownColors.Update`, which populates them into `System.Drawing.KnownColors.ArgbValues`. In Mono 5 and earlier, this flowed through to the visible UI. It seems that as of Mono 6, this table no longer affects the visible WinForms UI (although it is still being updated!). Instead, a same-but-different table in `System.Drawing.KnownColorTable` drives the system colors now. I was not able to identify the commit in which this change was made. ## Changes Now `Theme.SetSystemColors` accesses `System.Drawing.KnownColorTable.s_colorTable` instead, and WinForms apps once again obey GTK and KDE themes: ![image](https://user-images.githubusercontent.com/1559108/69486043-f3bf0500-0e0c-11ea-9b29-1654ba4e6d9a.png) Fixes KSP-CKAN/CKAN#2881.
My fix for Mono was accepted, so Linux users should have dark mode again at some point in the hopefully not-too-distant future. Windows users already have access to dark theming via the standard/classical desktop theme color settings: In Windows 7:
Yes, this will change the color of all your apps and taskbar and so on. I'm looking into a way around that now, there should be some way to combine this with the more modern Aero theming. |
OK, partial success with this method (it seems that not quite every color is theme-able):
I'm going to see whether we can do anything at the application level to improve upon that, maybe there are a few hard coded colors left in there somewhere... |
## Background In Mono 5 and earlier, the active GTK or KDE theme would be sourced for system colors, allowing dark themes to be obeyed: ![image](https://user-images.githubusercontent.com/1559108/69486043-f3bf0500-0e0c-11ea-9b29-1654ba4e6d9a.png) This allowed WinForms apps to blend in and look more like native apps. ## Problem In Mono 6, this capability was lost (as noted in passing in mono#14325). WinForms apps now only look like this, regardless of the system color settings: ![image](https://user-images.githubusercontent.com/1559108/69486114-dccce280-0e0d-11ea-8107-fe1653b2d816.png) This looks somewhat jarring and worse than previous Mono releases, for users with a dark system theme. ## Cause During load of the system settings (in the static constructor of `X11DesktopColors`), `Theme.SetSystemColors` passes system color data to `System.Drawing.KnownColors.Update`, which populates them into `System.Drawing.KnownColors.ArgbValues`. In Mono 5 and earlier, this flowed through to the visible UI. It seems that as of Mono 6, this table no longer affects the visible WinForms UI (although it is still being updated!). Instead, a same-but-different table in `System.Drawing.KnownColorTable` drives the system colors now. I was not able to identify the commit in which this change was made. ## Changes Now `Theme.SetSystemColors` accesses `System.Drawing.KnownColorTable.s_colorTable` instead, and WinForms apps once again obey GTK and KDE themes: ![image](https://user-images.githubusercontent.com/1559108/69486043-f3bf0500-0e0c-11ea-9b29-1654ba4e6d9a.png) Fixes KSP-CKAN/CKAN#2881.
Changes: mono/api-snapshot@6f14e43...8ea1d66 $ git diff --shortstat 6f14e433...8ea1d663 21 files changed, 719 insertions(+), 444 deletions(-) Changes: mono/boringssl@4ca62c5...d7b108e $ git diff --shortstat 4ca62c57...d7b108ee 1 file changed, 1 insertion(+) Changes: dotnet/cecil@cb6c1ca...a6a7f5c $ git diff --shortstat cb6c1ca9...a6a7f5c0 47 files changed, 587 insertions(+), 444 deletions(-) Changes: mono/corefx@10a41e9...5940515 $ git diff --shortstat 10a41e9f...59405155 55 files changed, 1382 insertions(+), 369 deletions(-) Changes: mono/mono@18920a8...2edccc5 $ git diff --shortstat 18920a83...2edccc52 1393 files changed, 44742 insertions(+), 90381 deletions(-) Context: https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1005448 Context: https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1005448 Context: KSP-CKAN/CKAN#2881 Context: mono/mono#10559 Context: mono/mono#12249 Context: mono/mono#12337 Context: mono/mono#12995 Context: mono/mono#13777 Context: mono/mono#15006 Context: mono/mono#15010 Context: mono/mono#15181 Context: mono/mono#15805 Context: mono/mono#15845 Context: mono/mono#16026 Context: mono/mono#16206 Context: mono/mono#16410 Context: mono/mono#16513 Context: mono/mono#16557 Context: mono/mono#16588 Context: mono/mono#16632 Context: mono/mono#16701 Context: mono/mono#16778 Context: mono/mono#17053 Context: mono/mono#17084 Context: mono/mono#17133 Context: mono/mono#17151 Context: mono/mono#17161 Context: mono/mono#17190 Context: mono/mono#17278 Context: mono/mono#17278 Context: mono/mono#17317 Context: mono/mono#17367 Context: mono/mono#17389 Context: mono/mono#17546 Context: mono/mono#17549 Context: mono/mono#17569 Context: mono/mono#17601 Context: mono/mono#17665 Context: mono/mono#17687 Context: mono/mono#17737 Context: mono/mono#17790 Context: mono/mono#17869 Context: mono/mono#17878 Context: mono/mono#17916 Context: mono/mono#17924 Context: mono/mono#17926 Context: mono/mono#17931 Context: mono/mono#18213 Context: mono/mono#18221 Context: mono/mono#18273 Context: mono/mono#18276 Context: mono/mono#18317 Context: mono/mono#18388 Context: mono/mono#18455
Suggestions
It should be great if you could add a dark mode for the main windows late at night the window is killing my eyes ;)
Edit :
Oopsy may by the GUI redisign could be enough ;)
#2848
The text was updated successfully, but these errors were encountered: