kooloveme / thtmlviewer

Automatically exported from code.google.com/p/thtmlviewer
Other
0 stars 0 forks source link

Text highlight issue #255

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hello, first of all thank you for your awesome and very useful component.

Anyway there is an issue which is very annoying, when you highlight colored 
text it is kinda reversed which sometimes makes the thing fully unreadable.

Is there any way to have a normal highlight (uniform) color like wordpad / word 
or any web browser does ?

If no, I start studying the code to fix this issue myself, but as it is a very 
huge project could you give some clues to achieve this goal ?

Thank you in advance for your time !

Original issue reported on code.google.com by DarkCode...@gmail.com on 15 Jul 2013 at 9:57

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for spotting this inconvenience and sorry for responsing that late.

You're right, the highlighted text is very hard to read ;)

Please look for line "if Inverted then" in method TSection.Draw1() in unit 
HtmlSubs.pas. That block sets fore- and background colors of 
highlighted/inverted text.

A fixed color pair might not be the best solution as it could be the same as 
for the unhighlighted text. I'd prefer to exchange fore- and background colors. 
But what, if section background is transparent. Can we calculate the effective 
background color? What, if the background is an image? 

Nevertheless a fixed color pair should be clHighlight for the background and 
clHighligtText for the text.

You might want to fork https://github.com/BerndGabriel/HtmlViewer and modify 
branch HtmlViewer11.

Thanks for your support.

Original comment by OrphanCat on 23 Jul 2013 at 9:02