mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 06:19:32 +02:00
MG: repaints reduced
git-svn-id: trunk@320 -
This commit is contained in:
parent
78023a3cfd
commit
22be600ffb
@ -348,7 +348,9 @@ begin
|
|||||||
CurrentString := Copy(CurrentString, 1, Length(CurrentString) - 1);
|
CurrentString := Copy(CurrentString, 1, Length(CurrentString) - 1);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
Paint;
|
{$ifdef SYN_LAZARUS}
|
||||||
|
Invalidate;
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSynBaseCompletionForm.KeyPress(var Key: char);
|
procedure TSynBaseCompletionForm.KeyPress(var Key: char);
|
||||||
@ -364,7 +366,9 @@ begin
|
|||||||
else if Assigned(OnCancel) then
|
else if Assigned(OnCancel) then
|
||||||
OnCancel(Self);
|
OnCancel(Self);
|
||||||
end; // case
|
end; // case
|
||||||
Paint;
|
{$ifdef SYN_LAZARUS}
|
||||||
|
Invalidate;
|
||||||
|
{$ENDIF}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSynBaseCompletionForm.MouseDown(Button: TMouseButton;
|
procedure TSynBaseCompletionForm.MouseDown(Button: TMouseButton;
|
||||||
@ -394,7 +398,9 @@ begin
|
|||||||
Scroll.Max := 0
|
Scroll.Max := 0
|
||||||
else
|
else
|
||||||
Scroll.Max := ItemList.Count - NbLinesInWindow;
|
Scroll.Max := ItemList.Count - NbLinesInWindow;
|
||||||
|
{$IFNDEF SYN_LAZARUS}
|
||||||
Position := Position;
|
Position := Position;
|
||||||
|
{$ENDIF}
|
||||||
Scroll.LargeChange := NbLinesInWindow;
|
Scroll.LargeChange := NbLinesInWindow;
|
||||||
|
|
||||||
// draw a rectangle around the window
|
// draw a rectangle around the window
|
||||||
@ -418,7 +424,7 @@ begin
|
|||||||
Canvas.Rectangle(0, FFontHeight * i, width, FFontHeight * (i + 1));
|
Canvas.Rectangle(0, FFontHeight * i, width, FFontHeight * (i + 1));
|
||||||
Canvas.Pen.Color := clBlack;
|
Canvas.Pen.Color := clBlack;
|
||||||
Canvas.Font.Color := clWhite;
|
Canvas.Font.Color := clWhite;
|
||||||
Hint := ItemList[Scroll.Position + i];
|
Hint := ItemList[Position];
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
Begin
|
Begin
|
||||||
@ -445,7 +451,8 @@ begin
|
|||||||
Position := Scroll.Position
|
Position := Scroll.Position
|
||||||
else if Position > Scroll.Position + NbLinesInWindow - 1 then
|
else if Position > Scroll.Position + NbLinesInWindow - 1 then
|
||||||
Position := Scroll.Position + NbLinesInWindow - 1;
|
Position := Scroll.Position + NbLinesInWindow - 1;
|
||||||
Paint;
|
writeln('TSynBaseCompletionForm.ScrollChange');
|
||||||
|
Invalidate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSynBaseCompletionForm.ScrollGetFocus(Sender: TObject);
|
procedure TSynBaseCompletionForm.ScrollGetFocus(Sender: TObject);
|
||||||
@ -539,7 +546,7 @@ begin
|
|||||||
Scroll.Position := Position
|
Scroll.Position := Position
|
||||||
else if Scroll.Position < Position - NbLinesInWindow + 1 then
|
else if Scroll.Position < Position - NbLinesInWindow + 1 then
|
||||||
Scroll.Position := Position - NbLinesInWindow + 1;
|
Scroll.Position := Position - NbLinesInWindow + 1;
|
||||||
invalidate;
|
Invalidate;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -251,8 +251,9 @@ begin
|
|||||||
|
|
||||||
Include(FControlState, csCustomPaint);
|
Include(FControlState, csCustomPaint);
|
||||||
try
|
try
|
||||||
|
ControlState := ControlState + [csCustomPaint];
|
||||||
inherited WMPaint(Message);
|
inherited WMPaint(Message);
|
||||||
Paint; // TODO: move this to the PaintWindow function;
|
ControlState := ControlState - [csCustomPaint];
|
||||||
finally
|
finally
|
||||||
Exclude(FControlState, csCustomPaint);
|
Exclude(FControlState, csCustomPaint);
|
||||||
end;
|
end;
|
||||||
@ -938,8 +939,8 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.23 2001/07/06 06:25:37 lazarus
|
Revision 1.24 2001/07/10 13:25:49 lazarus
|
||||||
MG: fixes for ide speedbuttons, form.showmodal, initial lazarus.dci
|
MG: repaints reduced
|
||||||
|
|
||||||
Revision 1.22 2001/06/28 18:15:03 lazarus
|
Revision 1.22 2001/06/28 18:15:03 lazarus
|
||||||
MG: bugfixes for destroying controls
|
MG: bugfixes for destroying controls
|
||||||
|
Loading…
Reference in New Issue
Block a user