UPD: simplify OnDrawCell related in FileView

(cherry picked from commit 9fac3ef5e8)
This commit is contained in:
rich2014 2025-12-29 19:57:34 +08:00 committed by Alexander Koblov
commit c862dc324d
2 changed files with 0 additions and 37 deletions

View file

@ -47,9 +47,6 @@ type
{ TBriefFileView }
TBriefFileView = class (TFileViewWithGrid)
protected
function GetOnDrawCell: TFileViewOnDrawCell;
procedure SetOnDrawCell( OnDrawCell: TFileViewOnDrawCell );
protected
procedure CreateDefault(AOwner: TWinControl); override;
function GetFileViewGridClass: TFileViewGridClass; override;
@ -62,9 +59,7 @@ type
procedure DoFileUpdated(AFile: TDisplayFile; UpdatedProperties: TFilePropertiesTypes = []); override;
public
function Clone(NewParent: TWinControl): TBriefFileView; override;
procedure CloneTo(FileView: TFileView); override;
procedure SaveConfiguration(AConfig: TXmlConfig; ANode: TXmlNode; ASaveHistory:boolean); override;
property OnDrawCell: TFileViewOnDrawCell read GetOnDrawCell write SetOnDrawCell;
end;
implementation
@ -602,16 +597,6 @@ end;
{ TBriefFileView }
function TBriefFileView.GetOnDrawCell: TFileViewOnDrawCell;
begin
Result:= TBriefDrawGrid(dgPanel).OnDrawCell;
end;
procedure TBriefFileView.SetOnDrawCell(OnDrawCell: TFileViewOnDrawCell);
begin
TBriefDrawGrid(dgPanel).OnDrawCell:= OnDrawCell;
end;
procedure TBriefFileView.CreateDefault(AOwner: TWinControl);
begin
inherited CreateDefault(AOwner);
@ -725,13 +710,6 @@ begin
Result := TBriefFileView.Create(NewParent, Self);
end;
procedure TBriefFileView.CloneTo(FileView: TFileView);
begin
inherited CloneTo(FileView);
if FileView is TBriefFileView then
TBriefFileView(FileView).OnDrawCell:= self.OnDrawCell;
end;
procedure TBriefFileView.SaveConfiguration(AConfig: TXmlConfig; ANode: TXmlNode; ASaveHistory:boolean);
begin
inherited SaveConfiguration(AConfig, ANode, ASaveHistory);

View file

@ -111,9 +111,6 @@ type
dgPanel: TDrawGridEx;
FOnColumnResized: TColumnResized;
function GetOnDrawCell: TFileViewOnDrawCell;
procedure SetOnDrawCell( OnDrawCell: TFileViewOnDrawCell );
function GetColumnsClass: TPanelColumnsClass;
procedure SetRowCount(Count: Integer);
@ -217,7 +214,6 @@ type
procedure SetGridFunctionDim(ExternalDimFunction:TFunctionDime);
property OnColumnResized: TColumnResized read FOnColumnResized write FOnColumnResized;
property OnDrawCell: TFileViewOnDrawCell read GetOnDrawCell write SetOnDrawCell;
published
procedure cm_SaveFileDetailsToFile(const Params: array of string);
procedure cm_CopyFileDetailsToClip(const Params: array of string);
@ -968,7 +964,6 @@ begin
with TColumnsFileView(FileView) do
begin
FColumnsSortDirections := Self.FColumnsSortDirections;
OnDrawCell := Self.OnDrawCell;
ActiveColm := Self.ActiveColm;
ActiveColmSlave := nil;
@ -1127,16 +1122,6 @@ begin
Dec(Result.Last, dgPanel.FixedRows);
end;
function TColumnsFileView.GetOnDrawCell: TFileViewOnDrawCell;
begin
Result:= dgPanel.OnDrawCell;
end;
procedure TColumnsFileView.SetOnDrawCell(OnDrawCell: TFileViewOnDrawCell);
begin
dgPanel.OnDrawCell:= OnDrawCell;
end;
function TColumnsFileView.GetColumnsClass: TPanelColumnsClass;
begin
if isSlave then