diff options
author | Neil <nyamatongwe@gmail.com> | 2022-06-17 15:29:02 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2022-06-17 15:29:02 +1000 |
commit | f36407f2f07898245bda6cbe0e3a9e8be7c89b97 (patch) | |
tree | 0fbbd1ad3743dbe44a75708990e6346d9c49e6b2 | |
parent | db01b0f6df44a671f5e822c56df25b1d2c123962 (diff) | |
download | scintilla-mirror-f36407f2f07898245bda6cbe0e3a9e8be7c89b97.tar.gz |
Bug [#2335] Fix bad background colour for additional, secondary, and inactive
selections when printing.
-rw-r--r-- | doc/ScintillaHistory.html | 4 | ||||
-rw-r--r-- | src/EditView.cxx | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 8cb63f362..0b78539ee 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -584,6 +584,10 @@ Fix hiding selection when selection layer is SC_LAYER_UNDER_TEXT. <a href="https://sourceforge.net/p/scintilla/bugs/2334/">Bug #2334</a>. </li> + <li> + Fix bad background colour for additional, secondary, and inactive selections when printing. + <a href="https://sourceforge.net/p/scintilla/bugs/2335/">Bug #2335</a>. + </li> </ul> <h3> <a href="https://www.scintilla.org/scintilla523.zip">Release 5.2.3</a> diff --git a/src/EditView.cxx b/src/EditView.cxx index 6570d6df3..575c10d6d 100644 --- a/src/EditView.cxx +++ b/src/EditView.cxx @@ -2696,8 +2696,12 @@ Sci::Position EditView::FormatRange(bool draw, CharacterRangeFull chrg, Rectangl // Don't show the selection when printing vsPrint.elementColours.clear(); vsPrint.elementBaseColours.clear(); - // Transparent: - vsPrint.elementBaseColours[Element::SelectionBack] = ColourRGBA(0xc0, 0xc0, 0xc0, 0x0); + // Set all selection background colours to be transparent. + constexpr ColourRGBA transparent(0xc0, 0xc0, 0xc0, 0x0); + vsPrint.elementBaseColours[Element::SelectionBack] = transparent; + vsPrint.elementBaseColours[Element::SelectionAdditionalBack] = transparent; + vsPrint.elementBaseColours[Element::SelectionSecondaryBack] = transparent; + vsPrint.elementBaseColours[Element::SelectionInactiveBack] = transparent; vsPrint.caretLine.alwaysShow = false; // Don't highlight matching braces using indicators vsPrint.braceHighlightIndicatorSet = false; |