AutoCompletion in Dark Mode
-
You can start by telling us what version you’re using via posting your Debug Info.
If I try version 8.4.2 in dark mode, the autocomplete box seems to follow the correct styling.
-
really a customization of one of the Style Configurator presets
And whatever that means, if clarified, might shed some light on what is happening for you, too.
-
@TBugReporter said in AutoCompletion in Dark Mode:
I recently started using “Dark Mode” (really a customization of one of the Style Configurator presets)
You have confused two concepts. There is Dark Mode, controlled by Settings > Preferences > Dark Mode, which was a feature added in Notepad++ v8.0. And then there are Themes, controlled by Settings > Preferences > Style Configurator Select Theme pulldown, which have been around for time immemorial, and there are plenty of dark-colored themes.
You can select a dark Theme (like “Bespin”) without selecting Dark Mode. But themes only affect the editor portion, not the rest of the GUI. If you want the whole GUI dark, you have to use Notepad++ v8.0 or newer, and you have to set it to true Dark Mode, not just a dark Theme.
unanswered but similar complaint from three years ago
If you think there was a similar complaint from three years ago, then you are definitely talking about Themes, not about Dark Mode, because Dark Mode did not exist in Notepad++ three years ago.
-
@PeterJones said in AutoCompletion in Dark Mode:
But themes only affect the editor portion, not the rest of the GUI.
@TBugReporter Peter is correct about this. You can change GUI elements - including the AutoComplete background and highlight colors with newer Notepad++ because of the updated Scintilla editing component, but you need a “Scripting” plugin (e.g., NppExec, PythonScript) to do it.
This my setup for example using a modified Obsidian theme and PythonScript for GUI element colorization:
Cheers.
-
You like a “dark mode” but you’re not going “all in” for Dark Mode ? :-)
-
@Alan-Kilborn said in AutoCompletion in Dark Mode:
You like a “dark mode” but you’re not going “all in” for Dark Mode ? :-)
One could say I like my editors like my politics - light mode / dark mode presents a false dichotomy - I prefer the shades of grey - or Obsidian in this case ;-)
Cheers.
-
@Michael-Vincent said:
You can change GUI elements […] but you need a “Scripting” plugin (e.g., NppExec, PythonScript) to do it.
Okay, that answers the question of what, but now the question becames how? PythonScript appears to have no online documentation at all (and seems aimed at people familiar with programming in Python - of which I am not one), and NppExec has a single ReadMe/UpdateLog file that only lists available commands but not how to use them. I’m going to need some more details, please.
@Alan-Kilborn said:
You like a “dark mode” but you’re not going “all in” for Dark Mode ? :-)
That looks a lot like my custom theme - except without the monochrome icons.
-
@TBugReporter said in AutoCompletion in Dark Mode:
PythonScript appears to have no online documentation at all
That’s because it ships its whole documentation set with every installation.
seems aimed at people familiar with programming in Python
Yes. That’s the point of the plugin: the ability to use Python to automate Notepad++ or otherwise access the application’s interior actions.
And yes, to customize the GUI colors like @Michael-Vincent did, you would have to have a more-than-introductory idea of programming in general (though, like me, you could probably do pretty well with knowledge of other programming languages and the use of Google to figure out the right Python syntax for a particular construct)
NppExec has a single ReadMe/UpdateLog file that only lists available commands
… And it ships with “Help” actions in its menu: “Help/Manual” which pulls up a Windows CHM help file (the old-fashion standard for Windows help files); and “Help/Docs” which open 3 help files (one of which is probably what you called the “readme/update log”).
To be able to do such things, you are going to have to invest time to figure out how, as even if Michael shares his, it is not likely to match your exact desires, so you will still have to figure out how it works to match your needs.
-
@PeterJones said:
you could probably do pretty well with knowledge of other programming languages and the use of Google to figure out the right Python syntax for a particular construct
Yes, I agree, but I’m not all that interested in learning another programming language just to be able to issue one command; I’d rather go the other way (see below).
NppExec […]
ships with “Help” actions in its menu: “Help/Manual” which pulls up a Windows CHM help file (the old-fashion standard for Windows help files); and “Help/Docs” which open 3 help files (one of which is probably what you called the “readme/update log”).
This is the file I was referring to. I didn’t want to install the plugin without more information. I initially didn’t notice the CHM file on GitHub, but I’ve downloaded and read it now, and it appears to be an effort to bring something similar to VS Code’s “PowerShell Integrated Console” to Npp - which is nice, but still doesn’t get me any closer to answering my original question. Perhaps @Michael-Vincent would be kind enough to post his Python script, so I can adapt it to the tools I have available?
-
This is super simple in NppExec:
SCI_SENDMSG SCI_SETELEMENTCOLOUR SC_ELEMENT_LIST_BACK <COLOR>
where
<COLOR>
is the integer of the RGB color you want to use. The only issue is that it only works on the current Scintilla view so you need to set it again if you use the second view.See Scintilla docs (SCI_SETELEMENTCOLOUR ) for more info.
This can be done similarly in PythonScript, but I’m running the latest version (3.0.14) so make no guarantees this will work in PythonScript 2.
from Npp import * for ed in editor1, editor2: ed.setElementColour(ELEMENT.LIST, (0, 0, 0)) ed.setElementColour(ELEMENT.LIST_BACK, (144, 144, 144)) ed.setElementColour(ELEMENT.LIST_SELECTED, (255, 255, 255)) ed.setElementColour(ELEMENT.LIST_SELECTED_BACK, (0, 128, 255))
Cheers.
-
@Michael-Vincent said in AutoCompletion in Dark Mode:
setElementColour
This function does not appear to be a part of PythonScript2.
I’m not sure why this would be, because PythonScript3 is still considered “beta”…it doesn’t make sense that any advancements wouldn’t be backported, until such time as PS3 is really released and PS2 can be sunsetted.