Change colour of highlight in picklist
-
Hey, does anyone know how to change the colour of the highlighted line in a picklist? In the image below, “lil” is highlighted but it’s so close to the background colour, it’s not visible. I’ve been through the style config multiple times but can’t see which setting it might be. If I change the theme, the background and highlight change so it must be configurable? 🤷♂️
-
It might be helpful to know which theme you are using. And, BTW, unfortunately, themes aren’t well-maintained.
-
Hey, @Alan-Kilborn 👋 Select theme says “Default (stylers.xml)” but I’m sure I used to be using Deep Black. If I switch to that, it looks (almost) identical but the font size is different.
I’m just looking for the setting to change the style of the highlight if you happen to know which one it is? 😊
-
@Dave-Hope said in Change colour of highlight in picklist:
Hey, @Alan-Kilborn 👋 Select theme says “Default (stylers.xml)” but I’m sure I used to be using Deep Black. If I switch to that, it looks (almost) identical but the font size is different.
You are not using
Default (stylers.xml)
in that screenshot, unless you very much modified the default theme yourself. Are you sure that screenshot wasn’t from Deep Black or the DarkModeDefault?I’m just looking for the setting to change the style of the highlight if you happen to know which one it is? 😊
It’s not as simple as that. Experimentally: If the main theme’s background is white, then the “picklist highlighted/active” is blue. If the main theme has a different color, then the “picklist hightlighted/active” matches the main background, and the inactive picklist items have a background that is a little darker or a little lighter than the theme background (“little” means it changes R,G, and B values by ~20 each, if possible, without going below 0 or above 255). The calculation is not user-configurable, as far as I know.
I could have sworn there were issues reported about such things, but I couldn’t find them when I searched last week – maybe it was the panel background contrast, rather than the auto-completion picklist. But yes, I agree, with a dark background, the picklist contrast isn’t very helpful.
-
@PeterJones said in Change colour of highlight in picklist:
The calculation is not user-configurable, as far as I know.
Correct, but it can be changed with a plugin (e.g., PythonScript):
from Npp import editor, ELEMENT editor.setElementColour(ELEMENT.LIST_SELECTED_BACK, (0 , 64 , 255, 255))
That is a blue color with alpha opaque - need the latest PS3 for the alpha bit, otherwise, just drop the last
255
from the tuple.Cheers.
-
@Michael-Vincent said in Change colour of highlight in picklist:
but it can be changed with a plugin
I didn’t know that. Cool.
@dinkumoil , can that be added to your ExtSettings plugin?
-
@PeterJones said in Change colour of highlight in picklist:
can that be added to your ExtSettings plugin?
I have put it on my todo list.
Do you know the version of Scintilla (or rather the version of Notepad++) that introduced this feature?
-
@dinkumoil said in Change colour of highlight in picklist:
@Michael-Vincent
Do you know the version of Scintilla (or rather the version of Notepad++) that introduced this feature?Looking at https://www.scintilla.org/ScintillaHistory.html, it seems version 5.0.1:
Add SCI_SETELEMENTCOLOUR and related APIs to change colours of visible elements. Implement SC_ELEMENT_LIST* to change colours of autocompletion lists.
which methinks corresponds to Notepad++ 8.4:
https://notepad-plus-plus.org/downloads/v8.4/
Update Scintilla from v4.4.6 to v5.2.1 and add Lexilla v5.1.5. (Fix #10504)
Cheers.