<div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>No this third colour is something different. It is used in a specific <br>
circumstance but is undocumented and unchangeable.<br><br>
I would ask the Scintilla developers what the purpose of the colour <br>
(implemented as ViewStyle::selBackground2) is. (Assuming it is still in <br>
the current code.)</blockquote><div><br></div><div>I've looked at the Scintilla source code a bit and it seems you're right, that 3rd</div><div>undocumented color is a read-only color initialized in ViewStyle.cxx at:</div><div><br></div><div><a href="https://github.com/brupelo/scintilla/blob/master/src/ViewStyle.cxx#L84">https://github.com/brupelo/scintilla/blob/master/src/ViewStyle.cxx#L84</a> </div><div><a href="https://github.com/brupelo/scintilla/blob/master/src/ViewStyle.cxx#L211">https://github.com/brupelo/scintilla/blob/master/src/ViewStyle.cxx#L211</a> <br></div><div><br></div><div>it's initialized in both ViewStyle default and copy constructors.</div><div><br></div><div>And then used through this function <a href="https://github.com/brupelo/scintilla/blob/master/src/EditView.cxx#L831-L835">https://github.com/brupelo/scintilla/blob/master/src/EditView.cxx#L831-L835</a>,</div><div><br></div>we can see that color will be used when main=True and primarySelection=False, if we inspect a little bit more that EditView.cxx file</div><div class="gmail_quote">we'll see this function is called in few places such as:</div><div class="gmail_quote"><br></div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div class="gmail_quote"><div class="gmail_quote">return SelectionBackground(vsDraw, true, model.primarySelection);</div></div></div><div><div class="gmail_quote"><div class="gmail_quote">return SelectionBackground(vsDraw, false, model.primarySelection);</div></div></div><div><div class="gmail_quote"><div class="gmail_quote">surface->FillRectangle(rcSegment, SelectionBackground(vsDraw, r == model.sel.Main(), model.primarySelection));</div></div></div><div><div class="gmail_quote"><div class="gmail_quote">surface->FillRectangle(rcSegment, SelectionBackground(vsDraw, eolInSelection == 1, model.primarySelection));</div></div></div><div><div class="gmail_quote"><div class="gmail_quote">SimpleAlphaRectangle(surface, rcSegment, SelectionBackground(vsDraw, eolInSelection == 1, model.primarySelection), alpha);</div></div></div><div><div class="gmail_quote"><div class="gmail_quote">surface->FillRectangle(rcSegment, SelectionBackground(vsDraw, eolInSelection == 1, model.primarySelection));</div></div></div><div><div class="gmail_quote"><div class="gmail_quote">SimpleAlphaRectangle(surface, rcSegment, SelectionBackground(vsDraw, eolInSelection == 1, model.primarySelection), alpha);</div></div></div><div><div class="gmail_quote"><div class="gmail_quote">SimpleAlphaRectangle(surface, rcSegment, SelectionBackground(vsDraw, eolInSelection == 1, model.primarySelection), alpha);</div></div></div><div><div class="gmail_quote"><div class="gmail_quote">const ColourDesired background = SelectionBackground(vsDraw, r == model.sel.Main(), model.primarySelection);</div></div></div><div><div class="gmail_quote"><div class="gmail_quote">SimpleAlphaRectangle(surface, rcSegment, SelectionBackground(vsDraw, r == model.sel.Main(), model.primarySelection), alpha);</div></div></div><div><div class="gmail_quote"><div class="gmail_quote">surface->FillRectangle(rcArea, SelectionBackground(vsDraw, eolInSelection == 1, model.primarySelection));</div></div></div><div><div class="gmail_quote"><div class="gmail_quote">SimpleAlphaRectangle(surface, rcArea, SelectionBackground(vsDraw, eolInSelection == 1, model.primarySelection), alpha);</div></div></div></blockquote><div dir="ltr"><div class="gmail_quote"><div class="gmail_quote"><br></div><div class="gmail_quote">if we analize the above set of calls we'll see there are some unique cases from the whole set:</div><div class="gmail_quote"><br></div></div></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><div class="gmail_quote"><div class="gmail_quote"><div class="gmail_quote">SelectionBackground(vsDraw, eolInSelection == 1, model.primarySelection);</div></div></div></div></div><div><div><div class="gmail_quote"><div class="gmail_quote"><div class="gmail_quote">SelectionBackground(vsDraw, false, model.primarySelection);</div></div></div></div></div><div><div><div class="gmail_quote"><div class="gmail_quote"><div class="gmail_quote">SelectionBackground(vsDraw, r == model.sel.Main(), model.primarySelection);</div></div></div></div></div><div><div><div class="gmail_quote"><div class="gmail_quote"><div class="gmail_quote">SelectionBackground(vsDraw, true, model.primarySelection);</div></div></div></div></div></blockquote><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div><br></div><div>if we've get rid of the 2nd one, the only cases where that color could will be used is on these calls:</div><div><br></div><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div><div class="gmail_quote"><div class="gmail_quote"><div class="gmail_quote">SelectionBackground(vsDraw, eolInSelection == 1, model.primarySelection);</div></div></div></div></div><div><div><div class="gmail_quote"><div class="gmail_quote"><div class="gmail_quote">SelectionBackground(vsDraw, r == model.sel.Main(), model.primarySelection);<br></div></div></div></div></div><div><div><div class="gmail_quote"><div class="gmail_quote"><div class="gmail_quote">SelectionBackground(vsDraw, true, model.primarySelection);</div></div></div></div></div></blockquote><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><br class="gmail-Apple-interchange-newline"></div></div></div></div><div>Of course this doesn't explain the "human" meaning of that color but at least gives more background about it :/</div><div><br></div><div>Btw, it'd be great eventually to be able to build QScintilla myself so i could help to debug these type of issues... unfortunately when I </div><div>attempted to do so I've failed miserably :( . I'm on win7+latest_sip+latest_qscintilla and I've got vs2008/2010/2012/2015/2017 and yeah,</div><div>before you post the link I've read the provided docs at qscintilla :) , could you advice?</div><div><br></div><div>Thanks.</div></div></div></div></div>