Skip to content

Commit

Permalink
Fix WM_SYSCOLORCHANGE forward.
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnlaan committed Jun 15, 2024
1 parent 07fc321 commit 47f3b71
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Components/ScintEdit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ TScintEdit = class(TWinControl)
procedure SetWordChars(const S: AnsiString);
procedure ShowAutoComplete(const CharsEntered: Integer; const WordList: AnsiString);
procedure StyleNeeded(const EndPos: Integer);
procedure SysColorChange(const Message: TMessage);
procedure Undo;
procedure UpdateStyleAttributes;
function WordAtCursor: String;
Expand Down Expand Up @@ -1851,6 +1852,11 @@ procedure TScintEdit.StyleNeeded(const EndPos: Integer);
end;
end;

procedure TScintEdit.SysColorChange(const Message: TMessage);
begin
ForwardMessage(Message);
end;

procedure TScintEdit.Undo;
begin
Call(SCI_UNDO, 0, 0);
Expand Down Expand Up @@ -2046,7 +2052,6 @@ procedure TScintEdit.CMHintShow(var Message: TCMHintShow);
procedure TScintEdit.CMSysColorChange(var Message: TMessage);
begin
inherited;
ForwardMessage(Message);
UpdateStyleAttributes;
end;

Expand Down
8 changes: 8 additions & 0 deletions Projects/Src/CompForm.pas
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,7 @@ TCompileForm = class(TUIStateForm)
procedure WMStartNormally(var Message: TMessage); message WM_StartNormally;
procedure WMDPIChanged(var Message: TMessage); message WM_DPICHANGED;
procedure WMSettingChange(var Message: TMessage); message WM_SETTINGCHANGE;
procedure WMSysColorChange(var Message: TMessage); message WM_SYSCOLORCHANGE;
procedure WMThemeChanged(var Message: TMessage); message WM_THEMECHANGED;
procedure WMUAHDrawMenu(var Message: TMessage); message WM_UAHDRAWMENU;
procedure WMUAHDrawMenuItem(var Message: TMessage); message WM_UAHDRAWMENUITEM;
Expand Down Expand Up @@ -3014,6 +3015,13 @@ procedure TCompileForm.WMStartNormally(var Message: TMessage);
OpenFile(FMainMemo, CommandLineFilename, False);
end;

procedure TCompileForm.WMSysColorChange(var Message: TMessage);
begin
inherited;
for var Memo in FMemos do
Memo.SysColorChange(Message);
end;

procedure TCompileForm.UpdateReopenTabMenu(const Menu: TMenuItem);
begin
Menu.Clear;
Expand Down

0 comments on commit 47f3b71

Please sign in to comment.