diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/AutoComplete.cxx | 1 | ||||
-rw-r--r-- | src/AutoComplete.h | 1 | ||||
-rw-r--r-- | src/Platform.h | 1 | ||||
-rw-r--r-- | src/ScintillaBase.cxx | 8 |
4 files changed, 11 insertions, 0 deletions
diff --git a/src/AutoComplete.cxx b/src/AutoComplete.cxx index 2487d3042..058550d62 100644 --- a/src/AutoComplete.cxx +++ b/src/AutoComplete.cxx @@ -41,6 +41,7 @@ AutoComplete::AutoComplete() : ignoreCase(false), chooseSingle(false), options(AutoCompleteOption::Normal), + imageScale(1.0), posStart(0), startLen(0), cancelAtStartPos(true), diff --git a/src/AutoComplete.h b/src/AutoComplete.h index 378232a84..b1233332c 100644 --- a/src/AutoComplete.h +++ b/src/AutoComplete.h @@ -25,6 +25,7 @@ public: bool ignoreCase; bool chooseSingle; AutoCompleteOption options; + float imageScale; std::unique_ptr<ListBox> lb; Sci::Position posStart; Sci::Position startLen; diff --git a/src/Platform.h b/src/Platform.h index 77464945e..119b4ef3f 100644 --- a/src/Platform.h +++ b/src/Platform.h @@ -317,6 +317,7 @@ struct ListOptions { std::optional<ColourRGBA> foreSelected; std::optional<ColourRGBA> backSelected; AutoCompleteOption options=AutoCompleteOption::Normal; + float imageScale=1.0f; }; class ListBox : public Window { diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index a49cfab32..1f4c360da 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -296,6 +296,7 @@ void ScintillaBase::AutoCompleteStart(Sci::Position lenEntered, const char *list vs.ElementColour(Element::ListSelected), vs.ElementColour(Element::ListSelectedBack), ac.options, + ac.imageScale, }; int lineHeight; @@ -972,6 +973,13 @@ sptr_t ScintillaBase::WndProc(Message iMessage, uptr_t wParam, sptr_t lParam) { case Message::AutoCGetStyle: return vs.autocStyle; + case Message::AutoCSetImageScale: + ac.imageScale = static_cast<float>(wParam) / 100.0f; + break; + + case Message::AutoCGetImageScale: + return static_cast<int>(ac.imageScale * 100); + case Message::RegisterImage: ac.lb->RegisterImage(static_cast<int>(wParam), ConstCharPtrFromSPtr(lParam)); break; |