Re: Elements for inactive additional selections

Neil Hodgson <[email protected]>
Newsgroups gmane.comp.lib.scintilla.devel
Message-ID <[email protected]>
[email protected]:
 

Is there a way within Scintilla of physically disabling the 
SELECTION_INACTIVE_BACK element? "Just not setting it" lets it pull in the 
OS default.


Elements can be set to nothing with SCI_RESETELEMENTCOLOUR but that is 
unlikely to help here as another element, commonly SELECTION_BACK, will be 
used. If you reset all the potential choices for selection background then 
Scintilla will draw with bugColour (which is magenta) since it *has* to 
clear those otherwise uninitialized pixels to provide a consistent 
appearance.

Please allow me to expand on that.  Setting the Alpha value to 0 does not 
work. Setting the selection inactive back to the Qt::transparent color does 
not work. If I change the selection layer to other than zero the selection 
isn't displayed and the text gets blanked out when clicking on a different 
window.


If you are using SC_LAYER_BASE then the selection is the first thing drawn 
over those pixels: there's nothing behind it so it is drawn opaquely. 
Translucency only works with 

Distinct colours for SELECTION_BACK and SELECTION_SECONDARY_BACK will help 
spot issues with primary selection.

Until more progress is seen, use SC_LAYER_OVER_TEXT in preference 
to SC_LAYER_UNDER_TEXT as that requires multi-phase drawing.

That brings up the next potential issue: what is PHASESDRAW set 
to? SC_PHASES_MULTIPLE is the safest choice and should be used until 
drawing is correct. Once drawing is correct, this may be dialled down 
to SC_PHASES_TWO for performance if needed.

Neil

-- 
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/scintilla-interest/2ca9322e-0565-42f8-94ac-e1a768d7562bn%40googlegroups.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.