From ad7f10a29853beb17663e72e6fd18e8977ebec42 Mon Sep 17 00:00:00 2001 From: Neil Hodgson Date: Sat, 15 May 2021 11:12:54 +1000 Subject: Bug [#2253]. For SCI_SETSELALPHA, also update the alpha of secondary and no-focus states to avoid hiding text under opaque selections. This leads to very faint selections but that is preferrable to not being able to see text. --- src/Editor.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index 3504c4d35..a2a2377ef 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -7494,8 +7494,11 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { vs.selection.layer = layerNew; UpdateBaseElements(); } - vs.SetElementAlpha(SC_ELEMENT_SELECTION_BACK, static_cast(wParam)); - vs.SetElementAlpha(SC_ELEMENT_SELECTION_ADDITIONAL_BACK, static_cast(wParam)); + const int alpha = static_cast(wParam); + vs.SetElementAlpha(SC_ELEMENT_SELECTION_BACK, alpha); + vs.SetElementAlpha(SC_ELEMENT_SELECTION_ADDITIONAL_BACK, alpha); + vs.SetElementAlpha(SC_ELEMENT_SELECTION_SECONDARY_BACK, alpha); + vs.SetElementAlpha(SC_ELEMENT_SELECTION_NO_FOCUS_BACK, alpha); InvalidateStyleRedraw(); } break; -- cgit v1.2.3