From cdebed110891834a44cdfcad7b9745eaeecf8ccb Mon Sep 17 00:00:00 2001 From: lededev <30518126+lededev@users.noreply.github.com> Date: Mon, 11 Nov 2024 11:41:16 +0800 Subject: [PATCH] Caret (text cursor) follow windows settings --- Externals/crystaledit/editlib/ccrystaltextview.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Externals/crystaledit/editlib/ccrystaltextview.cpp b/Externals/crystaledit/editlib/ccrystaltextview.cpp index 94009c33838..7c037dc4282 100644 --- a/Externals/crystaledit/editlib/ccrystaltextview.cpp +++ b/Externals/crystaledit/editlib/ccrystaltextview.cpp @@ -2870,7 +2870,11 @@ UpdateCaret () CreateSolidCaret (nCaretWidth, nCaretHeight); } else - CreateSolidCaret (2, nCaretHeight); + { + DWORD caretWidth = 2; + SystemParametersInfo (SPI_GETCARETWIDTH, 0, &caretWidth, 0); + CreateSolidCaret (caretWidth, nCaretHeight); + } SetCaretPos (TextToClient (m_ptCursorPos)); ShowCaret ();