aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authororbitalquark <70453897+orbitalquark@users.noreply.github.com>2025-05-12 11:38:13 +1000
committerorbitalquark <70453897+orbitalquark@users.noreply.github.com>2025-05-12 11:38:13 +1000
commit140a921a133ee63337e8dfe1c7261b7eb86399e9 (patch)
tree219a6641ddd4fd117bc0b0fa2bb1876d39f4499e /src
parentda1240f14a3fda528e8776cc873d124b6c8703f4 (diff)
downloadscintilla-mirror-140a921a133ee63337e8dfe1c7261b7eb86399e9.tar.gz
Add SCI_AUTOC{G,S}ETIMAGESCALE and implement for Qt and GTK.
Diffstat (limited to 'src')
-rw-r--r--src/AutoComplete.cxx1
-rw-r--r--src/AutoComplete.h1
-rw-r--r--src/Platform.h1
-rw-r--r--src/ScintillaBase.cxx8
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;