LCL: TScrollBox, remove unnecessary Invalidate on Windows. Issue #0026087 Move Invalidate in WS code for all other WS

git-svn-id: trunk@44840 -
This commit is contained in:
martin 2014-04-28 20:17:56 +00:00
parent 6a3eb32754
commit 8510d36eaf
7 changed files with 7 additions and 1 deletions

View File

@ -216,7 +216,7 @@ begin
if HandleAllocated and IsWindowVisible(Handle) then if HandleAllocated and IsWindowVisible(Handle) then
begin begin
TWSScrollingWinControlClass(WidgetSetClass).ScrollBy(Self, DeltaX, DeltaY); TWSScrollingWinControlClass(WidgetSetClass).ScrollBy(Self, DeltaX, DeltaY);
Invalidate; //Invalidate;
end end
else else
inherited ScrollBy(DeltaX, DeltaY); inherited ScrollBy(DeltaX, DeltaY);

View File

@ -142,6 +142,7 @@ begin
if not CheckHandle(AWinControl, Self, 'ScrollBy') then Exit; if not CheckHandle(AWinControl, Self, 'ScrollBy') then Exit;
TCarbonWidget(AWinControl.Handle).ScrollBy(DeltaX, DeltaY); TCarbonWidget(AWinControl.Handle).ScrollBy(DeltaX, DeltaY);
AWinControl.Invalidate;
end; end;
{ TCarbonWSCustomForm } { TCarbonWSCustomForm }

View File

@ -189,6 +189,7 @@ class procedure TGtkWSScrollingWinControl.ScrollBy(const AWinControl: TScrolling
const DeltaX, DeltaY: integer); const DeltaX, DeltaY: integer);
begin begin
{$IFDEF VerboseGtkToDos}{$note implement me}{$ENDIF} {$IFDEF VerboseGtkToDos}{$note implement me}{$ENDIF}
AWinControl.Invalidate;
end; end;
class procedure TGtkWSScrollingWinControl.SetColor( class procedure TGtkWSScrollingWinControl.SetColor(

View File

@ -975,6 +975,7 @@ begin
NewPos := v - DeltaY; NewPos := v - DeltaY;
gtk_adjustment_set_value(Adjustment, NewPos); gtk_adjustment_set_value(Adjustment, NewPos);
end; end;
AWinControl.Invalidate;
end; end;
{ TGtk2WSHintWindow } { TGtk2WSHintWindow }

View File

@ -200,6 +200,7 @@ begin
// writeln('OldValue ',dbgs(V),' NewValue ',dbgs(NewPos),' upper=',dbgs(Adjustment^.upper - Adjustment^.page_size)); // writeln('OldValue ',dbgs(V),' NewValue ',dbgs(NewPos),' upper=',dbgs(Adjustment^.upper - Adjustment^.page_size));
gtk_adjustment_set_value(Adjustment, NewPos); gtk_adjustment_set_value(Adjustment, NewPos);
end; end;
AWinControl.Invalidate;
end; end;
{ TGtk3WSCustomForm } { TGtk3WSCustomForm }

View File

@ -143,6 +143,7 @@ begin
Exit; Exit;
Widget := TQtCustomControl(AWinControl.Handle); Widget := TQtCustomControl(AWinControl.Handle);
Widget.viewport.scroll(DeltaX, DeltaY); Widget.viewport.scroll(DeltaX, DeltaY);
AWinControl.Invalidate;
end; end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------

View File

@ -143,6 +143,7 @@ implementation
class procedure TWSScrollingWinControl.ScrollBy(const AWinControl: TScrollingWinControl; class procedure TWSScrollingWinControl.ScrollBy(const AWinControl: TScrollingWinControl;
const DeltaX, DeltaY: integer); const DeltaX, DeltaY: integer);
begin begin
AWinControl.Invalidate;
end; end;
{ TWSCustomForm } { TWSCustomForm }