I'm currently using the SC_MARK_BACKGROUND marker type to highlight
errors, breakpoints, etc.
The problem I have is that if the background color for the marker
happens to be similar to some of the foreground colors used to style
text, the text can become unreadable.
To prevent that from happening, I would like to override the text color
as well.
At first I thought I might be able to accomplish that by applying a
special style to the lines, but that affects the fonts used as well as
the colors.
Essentially I'm looking for the marker equivalent of SCI_SETSELFORE: I
want to apply a special foreground color to the text on a line but still
keep all of the usual fonts, bolding, etc.
Is there some way of doing this that I'm just missing?
Thanks.
--
Jordan Russell
> Essentially I'm looking for the marker equivalent of SCI_SETSELFORE: I
> want to apply a special foreground color to the text on a line but still
> keep all of the usual fonts, bolding, etc.
There is no support for this.
Neil
> The problem I have is that if the background color for the marker
> happens to be similar to some of the foreground colors used to style
> text, the text can become unreadable.
>
> To prevent that from happening, I would like to override the text color
> as well.
But then you lose all the information from the text foreground
colouring. Wouldn't you be better off setting an alpha value so that
you can still see the different text colours?
Neil
I spent a lot of time experimenting with various alpha settings, and
with just lighter background colors, but never managed to achieve a
totally satisfactory result.
I suppose some screen shots would help explain things:
http://www.jrsoftware.org/images/scintillascrn.png
Image 1: This is how my editor looked pre-Scintilla. The classic
"Borland IDE" colors are used to highlight error lines and breakpoints.
Image 2: This is what happens if I try to use the same background colors
in Scintilla but without overriding the foreground colors.
Image 3: This is with an alpha of 128. It's an improvement but the black
text is still a bit difficult to make out.
Image 4: Only by using a very low alpha like 32 does the text, in my
opinion, become fairly readable.
But the light pink just isn't working for me. :)
--
Jordan Russell
Neil