Forum > Options

[SOLVED] Completion box show identifiers in pink colors instead of green

(1/2) > >>

furious programming:
See the first attachment — this is the colors scheme I'm using currently. Previously, I have the background color set to RGB 8-8-8 and the completion box looks like in the second attachment (looks good, as expected). But if i change the editor background color (empty space) to RGB 10-10-10, the completion box renders all identifiers using pink color, as you can see in the third screenshot. I don't know what is going on, why the completion box tries to improve colors (and apparently xor-ing identifier color) since this window should looks the same as the normal source editor window (SynEdit).

Question: which line of the Lazarus source code should I comment out or change in the other way to have green identifiers in the completion box instead of pink ones?

In my opinion, the colors used in the completion box should match those used in the code editor in terms of default behavior. Secondly, there should be an option to set custom colors for the elements of this window, just as you can do for the content of other IDE windows, e.g. Messages, Object Inspector, Form Designer and so on.

Martin_fr:
Somewhere in the SynEdit code (I can't find it myself right now) is some code that looks at the diff between fore and background. And if that goes below a threshold....

But IIRC the drop down, is painted by IDE code... So I wouldn't be sure it uses that. But I haven't looked at it in a while.
Afaik unit "SourceEditorProcs"

And if it does anything to the color, then it would have to use "ColorToRGB" first....

From a quick glance: SetFontColor in that unit does compute a diff....

furious programming:

--- Quote from: Martin_fr on March 27, 2024, 02:11:33 pm ---Afaik unit "SourceEditorProcs"

--- End quote ---

I don't have such file in the entire Lazarus installation.

Martin_fr:

--- Quote from: furious programming on March 27, 2024, 02:40:02 pm ---
--- Quote from: Martin_fr on March 27, 2024, 02:11:33 pm ---Afaik unit "SourceEditorProcs"

--- End quote ---

I don't have such file in the entire Lazarus installation.

--- End quote ---

Sorry, didn't copy and paste...

ide/sourceeditprocs.pas

furious programming:
Ok, I found the usage of the InvertColor function, comment it out and pink color is gone. But the problem is that other colors are also not inverted, so hardcoded colors like clBlack for ctnUnit and ctnUseUnitClearName are invisible, so I have to additionally change them.

Please, do the style configurator for the completion box, similar to the one for the SynEdit. The current solution is poor and irritating.

Navigation

[0] Message Index

[#] Next page

Go to full version