diff options
author | Neil Hodgson <nyamatongwe@gmail.com> | 2021-05-15 11:12:54 +1000 |
---|---|---|
committer | Neil Hodgson <nyamatongwe@gmail.com> | 2021-05-15 11:12:54 +1000 |
commit | ad7f10a29853beb17663e72e6fd18e8977ebec42 (patch) | |
tree | 06e17f0291023fabe901172de6e273bf9220e5a4 /src | |
parent | 9e65bad8fb326e53868e30ee2c7cdcbeffd6324a (diff) | |
download | scintilla-mirror-ad7f10a29853beb17663e72e6fd18e8977ebec42.tar.gz |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/Editor.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
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<int>(wParam)); - vs.SetElementAlpha(SC_ELEMENT_SELECTION_ADDITIONAL_BACK, static_cast<int>(wParam)); + const int alpha = static_cast<int>(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; |