LCL: added WSWinControl.Repaint, since all widgetsets except win32 calls update twice in TWinControl.Repaint. Default method calls Invalidate and Update like it was in TWinControl.Repaint, now widgetsets can implement it's own way of Repaint method. eg for Qt QWidget_repaint() - one call for immediate repaint.

git-svn-id: trunk@54107 -
This commit is contained in:
zeljko 2017-02-07 11:53:35 +00:00
parent 2a82da77b0
commit 0b2fc88171
2 changed files with 8 additions and 2 deletions

View File

@ -6088,8 +6088,7 @@ begin
if csDesigning in ComponentState then
DebugLn('TWinControl.Repaint A ',Name,':',ClassName);
{$ENDIF}
Invalidate;
Update;
TWSWinControlClass(WidgetSetClass).Repaint(Self);
end;
{------------------------------------------------------------------------------

View File

@ -134,6 +134,7 @@ type
class procedure DefaultWndHandler(const AWinControl: TWinControl; var AMessage); virtual;
class procedure Invalidate(const AWinControl: TWinControl); virtual;
class procedure PaintTo(const AWinControl: TWinControl; ADC: HDC; X, Y: Integer); virtual;
class procedure Repaint(const AWinControl: TWinControl); virtual;
class procedure ShowHide(const AWinControl: TWinControl); virtual; //TODO: rename to SetVisible(control, visible)
class procedure ScrollBy(const AWinControl: TWinControl; DeltaX, DeltaY: integer); virtual;
end;
@ -335,6 +336,12 @@ begin
end;
class procedure TWSWinControl.Repaint(const AWinControl: TWinControl);
begin
AWinControl.Invalidate;
AWinControl.Update;
end;
class procedure TWSWinControl.SetBounds(const AWinControl: TWinControl; const ALeft, ATop, AWidth, AHeight: Integer);
begin
end;