mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-08 12:47:27 +01:00
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:
parent
6a3eb32754
commit
8510d36eaf
@ -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);
|
||||||
|
|||||||
@ -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 }
|
||||||
|
|||||||
@ -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(
|
||||||
|
|||||||
@ -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 }
|
||||||
|
|||||||
@ -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 }
|
||||||
|
|||||||
@ -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;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -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 }
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user