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

Enhancement: Automatic Dark mode - follow system setting (W10, possibly others) #9183

Closed
Zvone7 opened this issue Nov 19, 2020 · 22 comments
Closed
Assignees
Labels
accepted dark mode Dark mode related issues, fixes

Comments

@Zvone7
Copy link

Zvone7 commented Nov 19, 2020

Hi!
Haven't found an open issue with this idea/request exactly, but it would be really sweet if notepad++ could follow the theme set in W10 automatically. (possible extended to other OS as well)
This issue does relate to #5852 but it's taking a step further.

@HaroldPetersInskipp
Copy link

Would love to have this as well, but I've heard it isn't possible until Scintilla has some updates as Notepad++ is built with Scintilla. Really any kind of dark mode (NOT high contrast) would be tremendously helpful to those with visual impairments.

@muRn
Copy link

muRn commented Dec 21, 2020

I was thinking about this feature myself when I saw people making custom builds of Notepad++ just to not have the toolbar so bright when everything around is dark.

I did some research and looks like app can detect if dark theme is enabled and behave accordingly. This is how this can be done in UWP app. And this is how to do the same by reading from windows registry. Correct me if I'm wrong but as I understand Notepad++ is not an UWP app but a plain C++ & WinAPI one, so first link is not an option. But the second one is, ain't it? It should be pretty straightforward to read from registry, right?

I'm not a C++ developer but I had some C++ experience in the past. I can try blow the dust from Visual Studio and implement the change myself if someone from core contributors confirms that my understanding is correct and feature is welcome/desired.

@donho donho self-assigned this Dec 22, 2020
@n3tcom
Copy link

n3tcom commented Dec 23, 2020

What I have done to get near this result is use the Style Configurator to style the Editor Background, Fonts, etc., as well the inactive tab background and font is able to be styled, however not the active tab (I suspect due to an ancient bug in applying the color styles incorrectly). I then disable the menu and toolbar. This only leaves the active tab, scrollbars, and status bar as the remaining bright objects on-screen. Better than nothing.

@adzm
Copy link
Contributor

adzm commented Jan 13, 2021

I was messing around with this recently and managed to get some basic functionality following the undocumented stuff eg from win32-darkmode. There are a lot of miscellaneous changes that would need to be done in order to get everything truly dark mode, especially with dialog boxes and all that, but owner-drawn menus and toolbars and statusbars would be able to handle all of the main window in dark mode. I'm tempted to give this a shot, but uncertain if it would be wasted effort if it is not something that would get merged by devs eventually. Regardless, I might as well use some of my win32 experience for something and at least get the main window darkmode-aware, which would at least be a starting point for future changes in the static dialogs (which are the trickiest due to the tab / property page backgrounds, and the various other controls and hardcoded colors in there, as well as potential issues with third party plugins)

@mere-human
Copy link
Contributor

@adzm

I might as well use some of my win32 experience for something and at least get the main window darkmode-aware, which would at least be a starting point for future changes in the static dialogs

I think, having at least dark mode support for the main window is a good start and better than nothing.
Gotta start somewhere!

I wanted to bring this to your attention. There is a tool called Google trends that shows what people search for.
The dark mode seems to be one of the hot Notepad++ related topics. So we better implement it one way or another.
image

@adzm
Copy link
Contributor

adzm commented Feb 10, 2021

#7692 is dark mode in general. #9183 is having it follow system themes automatically, which is worth considering since when implemented it will likely need a dark/light/system option like many other apps. #5852 seems to describe the scintilla autocomplete popup but I think was originally intended to be a dark mode issue like #7692.

I'll keep the dark mode discussion in #7692 so as to keep things on topic and leave this for the system/automatic stuff.

I do have dark mode working out pretty well; just need to clean up the code a bit one night and make a PR. You can see the screenshot #7692 (comment)

@SirTwsted
Copy link

@donho THANK YOU THANK YOU THANK YOU..!! Finally Dark Mode !!

How do I get it to follow Windows 10 dark theme now? or is that not coded in?
Anyways its still awesome thx :)

@EatonZ
Copy link

EatonZ commented Jun 8, 2021

Please add a setting to sync with the current Windows them/mode. Thanks.

@mere-human
Copy link
Contributor

@EatonZ @SirTwsted

Please add a setting to sync with the current Windows them/mode. Thanks.

Maybe, you should create a new feature request for that:
https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/CONTRIBUTING.md#reporting-issues

@sasumner
Copy link
Contributor

sasumner commented Jun 8, 2021

Please add a setting to sync with the current Windows theme/mode.

IMO this is not important, at all.
If you want a certain mode, just flip the checkbox for it.

@EatonZ
Copy link

EatonZ commented Jun 8, 2021

@sasumner All about preference I guess. I prefer not to have to toggle the setting each time I open the app at a certain time of day.

@sasumner
Copy link
Contributor

sasumner commented Jun 8, 2021

@EatonZ Ah, I guess that is a good point. As one that has never set up my PC to have different themes at different times of day, I lacked understanding of this. Thank you for pointing it out.

@Zvone7
Copy link
Author

Zvone7 commented Jun 9, 2021

@EatonZ @SirTwsted

Please add a setting to sync with the current Windows them/mode. Thanks.

Maybe, you should create a new feature request for that:
https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/CONTRIBUTING.md#reporting-issues

New ticket shouldn't be created since this ticket is titled "Automatic dark mode". Think it's wrong to consider this ticket closed, because, yes Dark Mode was added 🎉 , but it's not activated automatically and is not paying attention to Theme being active in windows.

@dogancelik
Copy link

dogancelik commented Oct 4, 2021

Commit 5a3bf49 doesn't seem to detect changes.

sync theme 3

My Notepad++ version: 8.1.5 (32-bit)
My plugins: Compare, Mime tools, Npp Converter, NppExport
Windows version: 19042.1110

@ndwhyy
Copy link

ndwhyy commented Dec 8, 2021

Why is this closed? Automatic dark mode doesn't work. This would be a tremendous addition! I like to use automatic transition to dark/light mode at sunset/sunrise.

@shantanub08
Copy link

This ticket indeed isn't supposed to be closed. I don't have anything useful to say, just commenting to show that people are still looking for Auto Dark Mode so this ticket should be open until it gets implemented

@EatonZ
Copy link

EatonZ commented Jan 16, 2022

@donho Can you re-open? Or do you prefer a new issue be opened at this point?

@donho donho reopened this Jan 16, 2022
@ArkadiuszMichalski ArkadiuszMichalski added the dark mode Dark mode related issues, fixes label Jan 20, 2022
@YakovL
Copy link

YakovL commented Jun 18, 2022

Besides "me too", let me note that the dark mode is governed by HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize\AppsUseLightTheme .AppsUseLightTheme registry value (I've tested that it's enough to switch it to make all the apps supporting "follow system setting" feature repaint).

@EatonZ
Copy link

EatonZ commented Nov 23, 2022

@donho @ozone10 Thank you for doing this! Been eagerly awaiting this, and can't wait for the next release.

@donho
Copy link
Member

donho commented Nov 24, 2022

@EatonZ
Please thank @ozone10 - it's the contribution from him.

@ZMYaro
Copy link

ZMYaro commented Jan 6, 2023

Thank you so much! This has been my most wanted feature for a while, and I am so appreciative to see it finally arrive!

@bigplayer-ai
Copy link

thank you so much, very easy and inituitive to use it right now. thanks @ozone10, I have a question can I switch the whole theme also? or it just enables dark mode in notepad++?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted dark mode Dark mode related issues, fixes
Projects
None yet
Development

Successfully merging a pull request may close this issue.