RxFPC:fix RxDBGrid draw title merging cell - thx. adilsonpazzini

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7680 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2020-09-21 12:02:51 +00:00
parent d36e545456
commit b97c60fa91
2 changed files with 8 additions and 6 deletions

View File

@ -751,6 +751,7 @@ type
{ TRxDBGrid } { TRxDBGrid }
TRxDBGrid = class(TCustomDBGrid) TRxDBGrid = class(TCustomDBGrid)
private private
FDrawGetDefaultRowHeight:integer;
FColumnDefValues: TRxDBGridColumnDefValues; FColumnDefValues: TRxDBGridColumnDefValues;
FIsSelectedDefaultFont:boolean; FIsSelectedDefaultFont:boolean;
@ -4439,7 +4440,7 @@ begin
end end
else else
begin begin
aRect2.Bottom := aRect2.Top + MLI.Height * GetDefaultRowHeight; aRect2.Bottom := aRect2.Top + MLI.Height * FDrawGetDefaultRowHeight;
aState := aState - [gdPushed]; aState := aState - [gdPushed];
end; end;
@ -4931,14 +4932,14 @@ begin
//TotalYOffs := GCache.ClientHeight {- (GetDefaultRowHeight * FFooterOptions.RowCount)}; //TotalYOffs := GCache.ClientHeight {- (GetDefaultRowHeight * FFooterOptions.RowCount)};
TotalYOffs := GCache.ClientRect.Bottom {- (GetDefaultRowHeight * FFooterOptions.RowCount)}; TotalYOffs := GCache.ClientRect.Bottom {- (GetDefaultRowHeight * FFooterOptions.RowCount)};
FooterRect := Rect(0, TotalYOffs, TotalWidth, TotalYOffs + GetDefaultRowHeight * FFooterOptions.RowCount); FooterRect := Rect(0, TotalYOffs, TotalWidth, TotalYOffs + FDrawGetDefaultRowHeight * FFooterOptions.RowCount);
Background := Canvas.Brush.Color; Background := Canvas.Brush.Color;
Canvas.Brush.Color := Color; Canvas.Brush.Color := Color;
Canvas.FillRect(FooterRect); Canvas.FillRect(FooterRect);
R.Top := TotalYOffs; R.Top := TotalYOffs;
R.Bottom := TotalYOffs + GetDefaultRowHeight * FFooterOptions.RowCount; R.Bottom := TotalYOffs + FDrawGetDefaultRowHeight * FFooterOptions.RowCount;
Canvas.Brush.Color := FFooterOptions.FColor; Canvas.Brush.Color := FFooterOptions.FColor;
if (Columns.Count > 0) then if (Columns.Count > 0) then
@ -4956,7 +4957,7 @@ begin
ABrush := nil;//initialize, no need create everytime. ABrush := nil;//initialize, no need create everytime.
R.Top := TotalYOffs; R.Top := TotalYOffs;
R.Bottom := TotalYOffs + GetDefaultRowHeight; R.Bottom := TotalYOffs + FDrawGetDefaultRowHeight;
for j:=0 to FFooterOptions.RowCount-1 do for j:=0 to FFooterOptions.RowCount-1 do
begin begin
@ -5034,7 +5035,7 @@ begin
end; end;
R.Top := R.Bottom; R.Top := R.Bottom;
R.Bottom := R.Bottom + GetDefaultRowHeight; R.Bottom := R.Bottom + FDrawGetDefaultRowHeight;
end; end;
if assigned(ABrush)then FreeAndNil(ABrush); if assigned(ABrush)then FreeAndNil(ABrush);
@ -5616,6 +5617,7 @@ var
begin begin
Inc(FInProcessCalc); Inc(FInProcessCalc);
DoClearInvalidTitle; DoClearInvalidTitle;
FDrawGetDefaultRowHeight:=GetDefaultRowHeight;
inherited Paint; inherited Paint;

View File

@ -25,7 +25,7 @@
Copyright (c) 1998 Master-Bank Copyright (c) 1998 Master-Bank
translate to Lazarus by alexs in 2005 - 2020"/> translate to Lazarus by alexs in 2005 - 2020"/>
<License Value="LGPL"/> <License Value="LGPL"/>
<Version Major="3" Minor="3" Release="3" Build="225"/> <Version Major="3" Minor="3" Release="4" Build="227"/>
<Files Count="70"> <Files Count="70">
<Item1> <Item1>
<Filename Value="registerrx.pas"/> <Filename Value="registerrx.pas"/>