Skip to content

Commit

Permalink
better fix flicker with white, on app start
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey-T committed Dec 20, 2024
1 parent 17525a9 commit 07c7cda
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion atsynedit/atsynedit.pas
Original file line number Diff line number Diff line change
Expand Up @@ -6314,6 +6314,7 @@ procedure TATSynEdit.Paint;
PaintEx(NLine);
finally
FPaintWorking:= false;
ATEditorOptions.EditorWasPaintedOnce:= true;
end;

if TATEditorInternalFlag.ScrollEventNeeded in FPaintFlags then
Expand Down Expand Up @@ -6481,7 +6482,7 @@ procedure TATSynEdit.WMEraseBkgnd(var Msg: TLMEraseBkgnd);
begin
//to avoid flickering with white on app startup
{$ifdef windows}
if Msg.DC<>0 then
if (not ATEditorOptions.EditorWasPaintedOnce) and (Msg.DC<>0) then
begin
Brush.Color:= Colors.TextBG;
R.Left:= 0;
Expand Down
1 change: 1 addition & 0 deletions atsynedit/atsynedit_globals.pas
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ TATEditorOptions = record
HintBookmarkDy: integer;
HintBookmarkMaxWidth: integer;
UrlMarkerTag: integer;
EditorWasPaintedOnce: boolean;

//UI strings
TextHintScrollPrefix: string;
Expand Down

0 comments on commit 07c7cda

Please sign in to comment.