From 4364b3c2400e9dc13628ea6c71afe62c50a472c6 Mon Sep 17 00:00:00 2001 From: ying32 Date: Tue, 5 Jan 2021 16:39:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DWindows=E4=B8=8BTRichMemo?= =?UTF-8?q?=E7=9A=84=E4=B8=80=E4=B8=AAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/3rd-party/richmemo/win32/win32richmemoproc.pas | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/3rd-party/richmemo/win32/win32richmemoproc.pas b/src/3rd-party/richmemo/win32/win32richmemoproc.pas index 416569a..d2f34c9 100644 --- a/src/3rd-party/richmemo/win32/win32richmemoproc.pas +++ b/src/3rd-party/richmemo/win32/win32richmemoproc.pas @@ -424,7 +424,7 @@ class function TRichEditManager.SetDefaultTextStyle(RichEditWnd: Handle; fmt.cbSize := sizeof(fmt); fmt.dwMask := fmt.dwMask or CFM_COLOR; - fmt.crTextColor := Params.Color; + fmt.crTextColor := ColorToRGB(Params.Color); fmt.dwMask := fmt.dwMask or CFM_FACE; // keep last char for Null-termination? @@ -459,7 +459,7 @@ class function TRichEditManager.SetSelectedTextStyle(RichEditWnd: Handle; if not useMask or (tmm_Color in AModifyMask) then begin fmt.dwMask := fmt.dwMask or CFM_COLOR; - fmt.crTextColor := Params.Color; + fmt.crTextColor := ColorToRGB(Params.Color); end; if not useMask or (tmm_Name in AModifyMask) then begin @@ -481,7 +481,7 @@ class function TRichEditManager.SetSelectedTextStyle(RichEditWnd: Handle; if not useMask or (tmm_BackColor in AModifyMask) then begin if Params.HasBkClr then begin fmt.dwMask := fmt.dwMask or CFM_BACKCOLOR; - fmt.crBackColor := Params.BkColor; + fmt.crBackColor := ColorToRGB(Params.BkColor); end else begin fmt.dwMask := fmt.dwMask or CFM_BACKCOLOR; fmt.dwEffects := fmt.dwEffects or CFE_AUTOBACKCOLOR;