mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-03 03:40:21 +02:00
lcl: Fix TCustomTreeView BackgroundColor broken in r52515 #2beb2f65d0 (issue #30312)
git-svn-id: trunk@52578 -
This commit is contained in:
parent
220c413059
commit
bbd1676580
@ -3210,7 +3210,7 @@ type
|
||||
TCustomTreeView = class(TCustomControl)
|
||||
private
|
||||
FAccessibilityOn: Boolean;
|
||||
FBackgroundColor: TColor;
|
||||
// FBackgroundColor: TColor;
|
||||
FBottomItem: TTreeNode;
|
||||
FCallingOnChange: Boolean;
|
||||
FEditingItem: TTreeNode;
|
||||
@ -3280,6 +3280,7 @@ type
|
||||
FHintWnd: THintWindow;
|
||||
procedure CanvasChanged(Sender: TObject);
|
||||
function GetAutoExpand: boolean;
|
||||
function GetBackgroundColor: TColor;
|
||||
function GetBottomItem: TTreeNode;
|
||||
function GetDropTarget: TTreeNode;
|
||||
function GetHideSelection: boolean;
|
||||
@ -3298,6 +3299,7 @@ type
|
||||
function GetShowSeparators: boolean;
|
||||
function GetToolTips: boolean;
|
||||
function GetTopItem: TTreeNode;
|
||||
function IsStoredBackgroundColor: Boolean;
|
||||
procedure HintMouseLeave(Sender: TObject);
|
||||
procedure ImageListChange(Sender: TObject);
|
||||
procedure OnChangeTimer(Sender: TObject);
|
||||
@ -3526,8 +3528,9 @@ type
|
||||
procedure MoveHome(ASelect: Boolean = False);
|
||||
procedure MoveEnd(ASelect: Boolean = False);
|
||||
public
|
||||
property BackgroundColor: TColor read FBackgroundColor write SetBackgroundColor default clWindow;
|
||||
property BackgroundColor: TColor read GetBackgroundColor write SetBackgroundColor stored IsStoredBackgroundColor;
|
||||
property BorderWidth default 0;
|
||||
property Color default clWindow;
|
||||
property BottomItem: TTreeNode read GetBottomItem write SetBottomItem;
|
||||
property DefaultItemHeight: integer read FDefItemHeight write SetDefaultItemHeight default 20;
|
||||
property DropTarget: TTreeNode read GetDropTarget write SetDropTarget;
|
||||
|
@ -3155,11 +3155,13 @@ begin
|
||||
+ [csDisplayDragImage, csReflector];
|
||||
Width := 121;
|
||||
Height := 97;
|
||||
Color := clWindow;
|
||||
|
||||
FSBVertShowing:=-1;
|
||||
FSBHorzShowing:=-1;
|
||||
TabStop := True;
|
||||
ParentColor := False;
|
||||
//FBackgroundColor := clWindow;
|
||||
// FBackgroundColor := clWindow;
|
||||
FDefItemHeight := 20;
|
||||
FExpandSignType := tvestTheme;
|
||||
UpdateExpandSignSize;
|
||||
@ -4134,6 +4136,11 @@ begin
|
||||
FHintWnd.Hide;
|
||||
end;
|
||||
|
||||
function TCustomTreeView.IsStoredBackgroundColor: Boolean;
|
||||
begin
|
||||
result := Color <> clWindow;
|
||||
end;
|
||||
|
||||
procedure TCustomTreeView.SetTopItem(Value: TTreeNode);
|
||||
begin
|
||||
if HandleAllocated and (Value <> nil) then
|
||||
@ -4390,6 +4397,11 @@ begin
|
||||
Result:=(tvoAutoExpand in FOptions);
|
||||
end;
|
||||
|
||||
function TCustomTreeView.GetBackgroundColor: TColor;
|
||||
begin
|
||||
Result := Color;
|
||||
end;
|
||||
|
||||
function TCustomTreeView.GetBottomItem: TTreeNode;
|
||||
begin
|
||||
if HandleAllocated then begin
|
||||
|
Loading…
Reference in New Issue
Block a user