From de9ae28bdbd99de9f44b887c72cddaaba4c7ccf0 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 22 Sep 2022 10:52:52 +0100 Subject: [PATCH] Fix typo. Fixes https://gitlab.com/kicad/code/kicad/issues/12467 (cherry picked from commit bb1eb94aa033715488c787b98c5d00ba7329933f) --- common/scintilla_tricks.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/common/scintilla_tricks.cpp b/common/scintilla_tricks.cpp index a6cad46344..fd1d08f4b6 100644 --- a/common/scintilla_tricks.cpp +++ b/common/scintilla_tricks.cpp @@ -110,9 +110,13 @@ void SCINTILLA_TRICKS::setupStyles() m_te->SetTabWidth( 4 ); } - // Set up the brace highlighting + // Set up the brace highlighting. Scintilla doesn't handle alpha, so we construct our own + // 20% wash by blending with the background. + KIGFX::COLOR4D braceText = foreground; + KIGFX::COLOR4D braceHighlight = braceText.Mix( background, 0.2 ); + m_te->StyleSetForeground( wxSTC_STYLE_BRACELIGHT, highlightText.ToColour() ); - m_te->StyleSetBackground( wxSTC_STYLE_BRACELIGHT, highlight.Saturate( 0.0 ).ToColour() ); + m_te->StyleSetBackground( wxSTC_STYLE_BRACELIGHT, braceHighlight.ToColour() ); m_te->StyleSetForeground( wxSTC_STYLE_BRACEBAD, *wxRED ); }