* Fix scrolling horizontally on gtk2 (gtk intf ScrollWindow implementation is broken)

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1100 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
blikblum
2009-12-30 14:07:15 +00:00
parent 2e9533f226
commit 17f4355903

View File

@ -19190,9 +19190,14 @@ begin
Inc(R.Top,FHeader.Height);
Inc(R.Bottom,FHeader.Height);
end;
//scrollwindow implementation under gtk is broken
{$ifdef Gtk}
InvalidateRect(Handle, nil, True);
{$else}
DelphiCompat.ScrollWindow(Handle, DeltaX, 0, @R, @R);
if DeltaY <> 0 then
DelphiCompat.ScrollWindow(Handle, 0, DeltaY, @R, @R);
{$endif}
end
else
begin
@ -19215,10 +19220,11 @@ begin
{$ifdef LCLQt}
DelphiCompat.ScrollWindow(Handle, DeltaX, DeltaY, @R, @R);
{$else}
ScrollWindowEx(Handle, DeltaX, DeltaY, @R, @R,0, nil, SW_INVALIDATE or SW_SCROLLCHILDREN);
{$endif}
{$ifdef Gtk}
InvalidateRect(Handle, nil, True);
{$else}
ScrollWindowEx(Handle, DeltaX, DeltaY, @R, @R,0, nil, SW_INVALIDATE or SW_SCROLLCHILDREN);
{$endif}
{$endif}
end;
end;
@ -22208,7 +22214,7 @@ begin
//lclheader
if hoVisible in FHeader.FOptions then
Inc(Target.Y, FHeader.Height);
Logger.Send([lcDrag],'FEffectiveOffsetX: %d, RTLOffset: %d, OffsetY: %d',[FEffectiveOffsetX,RTLOffset,FOffsetY]);
OffsetRect(Window, FEffectiveOffsetX - RTLOffset, -FOffsetY);
PaintTree(Canvas, Window, Target, Options);
end;