From 962c2c3c0c19190222424e727daaffec5c657bcd Mon Sep 17 00:00:00 2001 From: jesus Date: Sat, 2 Oct 2010 19:39:41 +0000 Subject: [PATCH] LCL, fix normal row drawing over fixed row (gtk), issue #13404 git-svn-id: trunk@27549 - --- lcl/grids.pas | 4 +++- lcl/interfaces/gtk/gtkwsgrids.pp | 10 ++++++++++ lcl/widgetset/wsgrids.pp | 6 ++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/lcl/grids.pas b/lcl/grids.pas index c9fa6d0018..d53c64c652 100644 --- a/lcl/grids.pas +++ b/lcl/grids.pas @@ -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.Y0 then + result := 0 + else + result := FixedHeight; +end; + end. diff --git a/lcl/widgetset/wsgrids.pp b/lcl/widgetset/wsgrids.pp index c75af86f00..2a584d03de 100644 --- a/lcl/widgetset/wsgrids.pp +++ b/lcl/widgetset/wsgrids.pp @@ -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;