RxFPC:fix compile with lcl 1.9

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6395 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2018-05-08 11:09:13 +00:00
parent 2a7a7830d6
commit 6e428bf96d
4 changed files with 14 additions and 6 deletions

View File

@ -439,6 +439,7 @@ begin
F.Parent:=Self; F.Parent:=Self;
F.Visible:=true; F.Visible:=true;
F.BringToFront; F.BringToFront;
if Assigned(Application) and Assigned(Application.MainForm) then
Application.MainForm.ActiveControl:=F; Application.MainForm.ActiveControl:=F;
B:=TRxMDIButton.CreateButton(TaskPanel, F); B:=TRxMDIButton.CreateButton(TaskPanel, F);

View File

@ -4526,7 +4526,7 @@ var
C: TRxColumn; C: TRxColumn;
j, DataCol, L, R: integer; j, DataCol, L, R: integer;
FIsMerged: Boolean; FIsMerged: Boolean;
(*
function CheckBoxHeight(const aState: TCheckboxState):integer; function CheckBoxHeight(const aState: TCheckboxState):integer;
const const
arrtb:array[TCheckboxState] of TThemedButton = (tbCheckBoxUncheckedNormal, tbCheckBoxCheckedNormal, tbCheckBoxMixedNormal); arrtb:array[TCheckboxState] of TThemedButton = (tbCheckBoxUncheckedNormal, tbCheckBoxCheckedNormal, tbCheckBoxMixedNormal);
@ -4551,7 +4551,7 @@ begin
Result:=DefaultRowHeight; Result:=DefaultRowHeight;
end; end;
end; end;
*)
begin begin
FIsMerged:=false; FIsMerged:=false;
@ -4586,14 +4586,17 @@ begin
else else
begin begin
case ColumnEditorStyle(aCol, F) of case ColumnEditorStyle(aCol, F) of
cbsCheckBoxColumn:begin cbsCheckBoxColumn:
(* begin
if C.Layout = tlTop then if C.Layout = tlTop then
aRect.Bottom:=aRect.Top + CheckBoxHeight(cbChecked) + varCellPadding + 1 aRect.Bottom:=aRect.Top + CheckBoxHeight(cbChecked) + varCellPadding + 1
else else
if C.Layout = tlBottom then if C.Layout = tlBottom then
aRect.Top:=aRect.Bottom - CheckBoxHeight(cbChecked) - varCellPadding - 1; aRect.Top:=aRect.Bottom - CheckBoxHeight(cbChecked) - varCellPadding - 1;
DrawCheckBoxBitmaps(aCol, aRect, F); DrawCheckBoxBitmaps(aCol, aRect, F);
end end*)
DrawCheckBoxBitmaps(aCol, aRect, F);
//DrawGridCheckboxBitmaps(aCol, aRect, F);
else else
S:=GetFieldDisplayText(F, C); S:=GetFieldDisplayText(F, C);
if ((rdgWordWrap in FOptionsRx) and Assigned(C) and (C.WordWrap)) or (FIsMerged) then if ((rdgWordWrap in FOptionsRx) and Assigned(C) and (C.WordWrap)) or (FIsMerged) then

View File

@ -128,7 +128,7 @@ procedure CloneRecord(DataSet: TDataSet; IgnoreFields: array of const);
function FieldValueToStrings(const DataSet: TDataSet; const FieldName: string; List:TStrings = nil):TStrings; function FieldValueToStrings(const DataSet: TDataSet; const FieldName: string; List:TStrings = nil):TStrings;
procedure AddSQLExpressionAnd(var MacroStr:string; const MacroWhere:string); overload; procedure AddSQLExpressionAnd(var MacroStr:string; const MacroWhere:string); overload;
procedure AddSQLExpressionAnd(var MacroStr:string; const MacroWhere:string; Params:array of const); overload; inline; procedure AddSQLExpressionAnd(var MacroStr:string; const MacroWhere:string; Params:array of const); overload;
procedure AddSQLExpressionOr(var MacroStr:string; const MacroWhere:string); procedure AddSQLExpressionOr(var MacroStr:string; const MacroWhere:string);
{ SQL expressions } { SQL expressions }

View File

@ -1378,6 +1378,7 @@ begin
end end
else else
begin begin
{$IF lcl_fullversion < 01090000}
ChkBitmap := GetImageForCheckBox(aCol, Row, AState); ChkBitmap := GetImageForCheckBox(aCol, Row, AState);
if ChkBitmap<>nil then if ChkBitmap<>nil then
begin begin
@ -1389,6 +1390,9 @@ begin
YPos := Trunc((aRect.Top+aRect.Bottom-ChkBitmap.Height)/2); YPos := Trunc((aRect.Top+aRect.Bottom-ChkBitmap.Height)/2);
Canvas.Draw(XPos, YPos, ChkBitmap); Canvas.Draw(XPos, YPos, ChkBitmap);
end; end;
{$ELSE}
DrawGridCheckboxBitmaps(aCol, Row, aRect, aState);
{$ENDIF}
end; end;
end; end;