mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-19 07:29:25 +02:00
LCL: TTreeView: replace wrong property default for DefaultItemHeight with stored function
git-svn-id: trunk@55111 -
This commit is contained in:
parent
73e1e2caee
commit
d8490f1c3c
@ -3409,6 +3409,7 @@ type
|
||||
Stage: TCustomDrawStage): Boolean; virtual;
|
||||
function CustomDrawItem(Node: TTreeNode; State: TCustomDrawState;
|
||||
Stage: TCustomDrawStage; var PaintImages: Boolean): Boolean; virtual;
|
||||
function DefaultItemHeightIsStored: Boolean;
|
||||
procedure DoAutoAdjustLayout(const AMode: TLayoutAdjustmentPolicy;
|
||||
const AXProportion, AYProportion: Double); override;
|
||||
function ExpandSignSizeIsStored: Boolean;
|
||||
@ -3575,7 +3576,7 @@ type
|
||||
property BorderWidth default 0;
|
||||
property BottomItem: TTreeNode read GetBottomItem write SetBottomItem;
|
||||
property Color default clWindow;
|
||||
property DefaultItemHeight: integer read FDefItemHeight write SetDefaultItemHeight default DefaultTreeNodeHeight;
|
||||
property DefaultItemHeight: integer read FDefItemHeight write SetDefaultItemHeight stored DefaultItemHeightIsStored;
|
||||
property DropTarget: TTreeNode read GetDropTarget write SetDropTarget;
|
||||
property ExpandSignColor: TColor read FExpandSignColor write FExpandSignColor default clWindowFrame;
|
||||
property ExpandSignSize: integer read GetExpandSignSize write SetExpandSignSize stored ExpandSignSizeIsStored;
|
||||
|
@ -3329,7 +3329,7 @@ begin
|
||||
begin
|
||||
DisableAutoSizing{$IFDEF DebugDisableAutoSizing}('TCustomTreeView.DoAutoAdjustLayout'){$ENDIF};
|
||||
try
|
||||
if not (tvoAutoItemHeight in Options) then
|
||||
if DefaultItemHeightIsStored then
|
||||
DefaultItemHeight := Round(DefaultItemHeight*AYProportion);
|
||||
if IndentIsStored then
|
||||
FIndent := Round(FIndent*AXProportion);
|
||||
@ -3428,6 +3428,11 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TCustomTreeView.DefaultItemHeightIsStored: Boolean;
|
||||
begin
|
||||
Result := not(tvoAutoItemHeight in Options);
|
||||
end;
|
||||
|
||||
function TCustomTreeView.DefaultTreeViewSort(Node1, Node2: TTreeNode): Integer;
|
||||
begin
|
||||
if Assigned(OnCompare) then begin
|
||||
|
Loading…
Reference in New Issue
Block a user