LCL, fix normal row drawing over fixed row (gtk), issue #13404

git-svn-id: trunk@27549 -
This commit is contained in:
jesus 2010-10-02 19:39:41 +00:00
parent 71bf9bda93
commit 962c2c3c0c
3 changed files with 19 additions and 1 deletions

View File

@ -4133,7 +4133,9 @@ begin
end else
if goSmoothScroll in Options then begin
CacheVisibleGrid;
R.TopLeft:=Point(0, FGCache.FixedHeight);
with FGCache do
R.TopLeft := Point(0,
TWSCustomGridClass(WidgetSetClass).InvalidateStartY(FixedHeight, TLRowOff));
R.BottomRight:=FGCache.MaxClientXY;
if FGcache.MaxClientXY.Y<FGCache.ClientHeight then
R.BottomRight.y := FGCache.ClientHeight;

View File

@ -35,6 +35,7 @@ type
TGtkWSCustomGrid = class(TWSCustomGrid)
published
class procedure SetFont(const AWinControl: TWinControl; const AFont: TFont); override;
class function InvalidateStartY(const FixedHeight, RowOffset: Integer): integer; override;
end;
@ -48,4 +49,13 @@ begin
//
end;
class function TGtkWSCustomGrid.InvalidateStartY(const FixedHeight,
RowOffset: Integer): integer;
begin
if RowOffset<>0 then
result := 0
else
result := FixedHeight;
end;
end.

View File

@ -54,6 +54,7 @@ type
TWSCustomGrid = class(TWSCustomControl)
published
class procedure SendCharToEditor(AEditor:TWinControl; Ch: TUTF8Char); virtual;
class function InvalidateStartY(const FixedHeight, RowOffset: Integer): integer; virtual;
end;
TWSCustomGridClass = class of TWSCustomgrid;
@ -80,6 +81,11 @@ begin
AEditor.Dispatch(GMsg);
end;
class function TWSCustomGrid.InvalidateStartY(const FixedHeight, RowOffset: Integer): Integer;
begin
result := FixedHeight;
end;
{ WidgetSetRegistration }
function RegisterCustomGrid: Boolean;