Closed natbrood closed 3 years ago
I think it should be added as well.
I would love to see Dark Mode support also.
If the Office Theme is set to Black (Dark Mode) there is an additional option in the View Tab on the ribbon. It's in the Page Setup group and is labeled Switch Background.
This will toggle the page contents and colors between light and dark mode but not change the chrome of the application or effect the Office Theme at large (as used by other Office Apps).
The registry value for this is found at
Computer\HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\OneNote\General\DarkModeCanvasLightsOn
Changing the DarkModeCanvasLightsOn
registry value does toggle the Switch Background option. So if NoteHightlight would:
DarkModeCanvasLightsOn
= 0 (off, display page content in dark mode) set it to 1 (Lights On, display page content in light mode)DarkModeCanvasLightsOn
was originally = 0, after highlighting set back to 0One other thing to account for though is that setting the registry value for DarkModeCanvasLightsOn
will make an immediate change (just like clicking the button in the View tab), except it will not apply to the OneNote Outline Elements that have an insertion point.
Above: An example of a page that was selected when LightsOn was changed from 0 to 1 via the registry. The page background changed from black to white, but the actual textbox and it's contents that contained the insertion point remained unchanged.
Above: An example of a page that had selected text when LightsOn was changed from 1 to 0 via the registry. The same effect as above but additionally the paragraph that contained the selected text has it's font colors augmented.
So, this is a bit strange but if you switch the background to light mode, then use notehighlight and the bright style, then switch back to darkmode it looks fine. If you stay in dark mode, then use notehightlight, it makes the text all way too dark. Pic below for comparison.
So, this is a bit strange but if you switch the background to light mode, then use notehighlight and the bright style, then switch back to darkmode it looks fine. If you stay in dark mode, then use notehightlight, it makes the text all way too dark. Pic below for comparison.
Strange when I tried that it didn't do anything. Also I'm finding even with turning off dark mode the colours are really washed out and hard to read. I'm using OneNote 2016.
The work around for this is to click "Switch background" -> write down the code -> switch back to dark mode.
Super weird work around but it works when you switch to light mode, write the code and then switch back to dark. Is there any plans to update this so we don't have to do that?
What happened to the comments by @wuwao1 from Sep 6th, about a Dark Mode fix they'd made? Did it run afoul as their fix was replacing an assembly instead of issuing a pull request?
@iamhammer ,Based on your comment, I wrote the following code,FYR.Thanks.
///////////////////////////////////////////////////////////////////////////////////////// private void shellExcuteStr(string boolDarkModeCanvasLightsOn) { Process p = new Process(); p.StartInfo.FileName = "cmd.exe"; p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardInput = true; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.RedirectStandardError = true; p.StartInfo.CreateNoWindow = true; p.Start(); string strCMD = boolDarkModeCanvasLightsOn; p.StandardInput.WriteLine(strCMD + " & exit"); p.StandardInput.AutoFlush = true; p.WaitForExit(); p.Close(); } /////////////////////////////////////////////////////////////////////////////////////////////////// string boolDarkModeCanvasLightsOn1 = @"reg add HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\OneNote\General /v DarkModeCanvasLightsOn /t REG_DWORD /d 1 /f"; shellExcuteStr(boolDarkModeCanvasLightsOn1); ////////////////////////////////////////////////////////////////////////////////////////////////////// string boolDarkModeCanvasLightsOn = @"reg add HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\OneNote\General /vDarkModeCanvasLightsOn /t REG_DWORD /d 0 /f"; shellExcuteStr(boolDarkModeCanvasLightsOn);
As for the code I modified, the personal test results were not very good and were not submitted, so I deleted them.
Dark mode support added to version 3.7
It's been a while since Microsoft allowed people to use the night theme of OneNote. As of right now, to get the proper color, I need to switch back to light mode and then, after importing, I need to switch back to dark mode.
Could dark mode compatibility be a future option?