From ab70e1041cb40c9d807a18ca7abb5c000adf2fdf Mon Sep 17 00:00:00 2001 From: Neil Date: Mon, 29 Mar 2021 08:25:51 +1100 Subject: Add SCI_SETELEMENTCOLOUR and related APIs to change colours of visible elements. Implement SC_ELEMENT_LIST* to change colours of autocompletion lists. --- src/ScintillaBase.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/ScintillaBase.cxx') diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index 1e55fcfbf..e2fb58206 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -260,6 +261,14 @@ void ScintillaBase::AutoCompleteStart(Sci::Position lenEntered, const char *list ac.Start(wMain, idAutoComplete, sel.MainCaret(), PointMainCaret(), lenEntered, vs.lineHeight, IsUnicodeMode(), technology); + ListOptions options{ + vs.ElementColour(SC_ELEMENT_LIST), + vs.ElementColour(SC_ELEMENT_LIST_BACK), + vs.ElementColour(SC_ELEMENT_LIST_SELECTED), + vs.ElementColour(SC_ELEMENT_LIST_SELECTED_BACK) + }; + ac.lb->SetOptions(options); + const PRectangle rcClient = GetClientRectangle(); Point pt = LocationFromPosition(sel.MainCaret() - lenEntered); PRectangle rcPopupBounds = wMain.GetMonitorRect(pt); -- cgit v1.2.3