LCL: treeview: High-DPI: use 0 for default (automatic) expand size

git-svn-id: trunk@54239 -
This commit is contained in:
ondrej 2017-02-21 20:47:57 +00:00
parent eb5e2e2060
commit a597ac1006
2 changed files with 3 additions and 3 deletions

View File

@ -3574,7 +3574,7 @@ type
property DefaultItemHeight: integer read FDefItemHeight write SetDefaultItemHeight default DefaultTreeNodeHeight;
property DropTarget: TTreeNode read GetDropTarget write SetDropTarget;
property ExpandSignColor: TColor read FExpandSignColor write FExpandSignColor default clWindowFrame;
property ExpandSignSize: integer read FExpandSignSize write SetExpandSignSize default -1; // use -1 for default
property ExpandSignSize: integer read FExpandSignSize write SetExpandSignSize default 0; // use 0 for default
property ExpandSignType: TTreeViewExpandSignType
read FExpandSignType write SetExpandSignType default tvestTheme;
property Images: TCustomImageList read FImages write SetImages;

View File

@ -3208,7 +3208,7 @@ begin
// FBackgroundColor := clWindow;
FDefItemHeight := DefaultTreeNodeHeight;
FExpandSignType := tvestTheme;
FExpandSignSize := -1;
FExpandSignSize := 0;
Details := ThemeServices.GetElementDetails(ttGlyphOpened);
FThemeExpandSignSize := ThemeServices.GetDetailSize(Details).cx;
FTreeNodes := CreateNodes;
@ -4487,7 +4487,7 @@ end;
function TCustomTreeView.GetRealExpandSignSize: integer;
begin
if FExpandSignSize>=0 then
if FExpandSignSize>0 then
Result := FExpandSignSize
else
if ExpandSignType = tvestTheme then