VirtualTreeView: Improved LCL scaling.

This commit is contained in:
wp_xyz 2024-10-04 17:34:21 +02:00
parent e9baea68d1
commit 402cffbdfd
3 changed files with 53 additions and 114 deletions

View File

@ -267,6 +267,7 @@ const
DEFAULT_MARGIN = 4; DEFAULT_MARGIN = 4;
DEFAULT_NODE_HEIGHT = 18; DEFAULT_NODE_HEIGHT = 18;
DEFAULT_SPACING = 3; DEFAULT_SPACING = 3;
DEFAULT_MINHEIGHT = 10;
LIS_NORMAL = 1; LIS_NORMAL = 1;
{$EXTERNALSYM LIS_NORMAL} {$EXTERNALSYM LIS_NORMAL}
@ -1325,6 +1326,7 @@ type
function IsDefaultHeightStored: Boolean; function IsDefaultHeightStored: Boolean;
function IsFontStored: Boolean; function IsFontStored: Boolean;
function IsHeightStored: Boolean; function IsHeightStored: Boolean;
function IsMinHeightStored: Boolean;
procedure SetAutoSizeIndex(Value: TColumnIndex); procedure SetAutoSizeIndex(Value: TColumnIndex);
procedure SetBackground(Value: TColor); procedure SetBackground(Value: TColor);
procedure SetColumns(Value: TVirtualTreeColumns); procedure SetColumns(Value: TVirtualTreeColumns);
@ -1420,7 +1422,7 @@ type
{$IFEND} {$IFEND}
property MainColumn: TColumnIndex read GetMainColumn write SetMainColumn default 0; property MainColumn: TColumnIndex read GetMainColumn write SetMainColumn default 0;
property MaxHeight: Integer read FMaxHeight write SetMaxHeight default 10000; property MaxHeight: Integer read FMaxHeight write SetMaxHeight default 10000;
property MinHeight: Integer read FMinHeight write SetMinHeight default 10; property MinHeight: Integer read FMinHeight write SetMinHeight stored IsMinHeightStored;
property Options: TVTHeaderOptions read FOptions write SetOptions default [hoColumnResize, hoDrag, hoShowSortGlyphs]; property Options: TVTHeaderOptions read FOptions write SetOptions default [hoColumnResize, hoDrag, hoShowSortGlyphs];
property ParentFont: Boolean read FParentFont write SetParentFont default False; property ParentFont: Boolean read FParentFont write SetParentFont default False;
property PopupMenu: TPopupMenu read FPopupMenu write FPopupMenu; property PopupMenu: TPopupMenu read FPopupMenu write FPopupMenu;
@ -2174,7 +2176,6 @@ type
FCustomCheckImages: TCustomImageList; // application defined check images FCustomCheckImages: TCustomImageList; // application defined check images
FCheckImageKind: TCheckImageKind; // light or dark, cross marks or tick marks FCheckImageKind: TCheckImageKind; // light or dark, cross marks or tick marks
FCheckImages: TCustomImageList; // Reference to global image list to be used for the check images. FCheckImages: TCustomImageList; // Reference to global image list to be used for the check images.
FButtonSize: Integer; // Size of the expand/collapse buttons
FImageChangeLink, FImageChangeLink,
FStateChangeLink, FStateChangeLink,
FCustomCheckChangeLink: TChangeLink; // connections to the image lists FCustomCheckChangeLink: TChangeLink; // connections to the image lists
@ -6923,13 +6924,8 @@ begin
inherited Create(Collection); inherited Create(Collection);
{$IF LCL_FullVersion >= 1080000}
FMargin := Owner.Header.TreeView.Scale96ToFont(DEFAULT_MARGIN);
FSpacing := Owner.Header.TreeView.Scale96ToFont(DEFAULT_SPACING);
{$ELSE}
FMargin := DEFAULT_MARGIN; FMargin := DEFAULT_MARGIN;
FSpacing := DEFAULT_SPACING; FSpacing := DEFAULT_SPACING;
{$IFEND}
FWidth := Owner.FDefaultWidth; FWidth := Owner.FDefaultWidth;
FLastWidth := Owner.FDefaultWidth; FLastWidth := Owner.FDefaultWidth;
@ -7049,22 +7045,14 @@ end;
function TVirtualTreeColumn.IsMarginStored: Boolean; function TVirtualTreeColumn.IsMarginStored: Boolean;
begin begin
{$IF LCL_FullVersion >= 1080000}
Result := FMargin <> Owner.Header.TreeView.Scale96ToFont(DEFAULT_MARGIN);
{$ELSE}
Result := FMargin <> DEFAULT_MARGIN; Result := FMargin <> DEFAULT_MARGIN;
{$IFEND}
end; end;
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
function TVirtualTreeColumn.IsSpacingStored: Boolean; function TVirtualTreeColumn.IsSpacingStored: Boolean;
begin begin
{$IF LCL_FullVersion >= 1080000}
Result := FSpacing <> Owner.Header.TreeView.Scale96ToFont(DEFAULT_SPACING);
{$ELSE}
Result := FSpacing <> DEFAULT_SPACING; Result := FSpacing <> DEFAULT_SPACING;
{$IFEND}
end; end;
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
@ -8101,11 +8089,7 @@ begin
FClickIndex := NoColumn; FClickIndex := NoColumn;
FDropTarget := NoColumn; FDropTarget := NoColumn;
FTrackIndex := NoColumn; FTrackIndex := NoColumn;
{$IF LCL_FullVersion >= 1080000}
FDefaultWidth := Header.TreeView.Scale96ToFont(DEFAULT_COLUMN_WIDTH);
{$ELSE}
FDefaultWidth := DEFAULT_COLUMN_WIDTH; FDefaultWidth := DEFAULT_COLUMN_WIDTH;
{$IFEND}
end; end;
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
@ -8152,11 +8136,7 @@ end;
function TVirtualTreeColumns.IsDefaultWidthStored: Boolean; function TVirtualTreeColumns.IsDefaultWidthStored: Boolean;
begin begin
{$IF LCL_FullVersion >= 1080000}
Result := FDefaultWidth <> Header.TreeView.Scale96ToFont(DEFAULT_COLUMN_WIDTH);
{$ELSE}
Result := FDefaultWidth <> DEFAULT_COLUMN_WIDTH; Result := FDefaultWidth <> DEFAULT_COLUMN_WIDTH;
{$IFEND}
end; end;
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
@ -9868,14 +9848,9 @@ begin
inherited Create; inherited Create;
FOwner := AOwner; FOwner := AOwner;
FColumns := GetColumnsClass.Create(Self); FColumns := GetColumnsClass.Create(Self);
{$IF LCL_FullVersion >= 1080000}
FHeight := FOwner.Scale96ToFont(DEFAULT_HEADER_HEIGHT);
FDefaultHeight := FOwner.Scale96ToFont(DEFAULT_HEADER_HEIGHT);
{$ELSE}
FHeight := DEFAULT_HEADER_HEIGHT; FHeight := DEFAULT_HEADER_HEIGHT;
FDefaultHeight := DEFAULT_HEADER_HEIGHT; FDefaultHeight := DEFAULT_HEADER_HEIGHT;
{$IFEND} FMinHeight := DEFAULT_MINHEIGHT;
FMinHeight := 10;
FMaxHeight := 10000; FMaxHeight := 10000;
FFont := TFont.Create; FFont := TFont.Create;
FFont.OnChange := FontChanged; FFont.OnChange := FontChanged;
@ -9969,11 +9944,7 @@ end;
function TVTHeader.IsDefaultHeightStored: Boolean; function TVTHeader.IsDefaultHeightStored: Boolean;
begin begin
{$IF LCL_FullVersion >= 1080000}
Result := FDefaultHeight <> FOwner.Scale96ToFont(DEFAULT_HEADER_HEIGHT);
{$ELSE}
Result := FDefaultHeight <> DEFAULT_HEADER_HEIGHT; Result := FDefaultHeight <> DEFAULT_HEADER_HEIGHT;
{$IFEND}
end; end;
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
@ -9988,15 +9959,16 @@ end;
function TVTHeader.IsHeightStored: Boolean; function TVTHeader.IsHeightStored: Boolean;
begin begin
{$IF LCL_FullVersion >= 1080000}
Result := FHeight <> FOwner.Scale96ToFont(DEFAULT_HEADER_HEIGHT);
{$ELSE}
Result := FHeight <> DEFAULT_HEADER_HEIGHT; Result := FHeight <> DEFAULT_HEADER_HEIGHT;
{$IFEND}
end; end;
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
function TVTHeader.IsMinHeightStored: Boolean;
begin
Result := FMinHeight <> DEFAULT_MINHEIGHT;
end;
procedure TVTHeader.SetAutoSizeIndex(Value: TColumnIndex); procedure TVTHeader.SetAutoSizeIndex(Value: TColumnIndex);
begin begin
@ -11501,15 +11473,17 @@ var
i: Integer; i: Integer;
col: TVirtualTreeColumn; col: TVirtualTreeColumn;
begin begin
// if not (toAutoChangeScale in Treeview.TreeOptions.AutoOptions) then
// begin
{
if IsDefaultHeightStored then if IsDefaultHeightStored then
FDefaultHeight := Round(FDefaultHeight * AYProportion); FDefaultHeight := Round(FDefaultHeight * AYProportion);
}
if IsHeightStored then FMinHeight := Round(FMinHeight * AYProportion);
FHeight := Round(FHeight * AYProportion); {
if Columns.IsDefaultWidthStored then if Columns.IsDefaultWidthStored then
Columns.DefaultWidth := Round(Columns.DefaultWidth * AXProportion); Columns.DefaultWidth := Round(Columns.DefaultWidth * AXProportion);
}
for i := 0 to Columns.Count-1 do begin for i := 0 to Columns.Count-1 do begin
col := Columns[i]; col := Columns[i];
if col.IsWidthStored then if col.IsWidthStored then
@ -11519,6 +11493,10 @@ begin
if col.IsMarginStored then if col.IsMarginStored then
col.Margin := Round(col.Margin * AXProportion); col.Margin := Round(col.Margin * AXProportion);
end; end;
// FontChanged(nil);
if IsHeightStored then
FHeight := Round(FHeight * AYProportion);
end; end;
{$IFEND} {$IFEND}
@ -12372,23 +12350,13 @@ begin
FDragImageKind := diComplete; FDragImageKind := diComplete;
FLastSelectionLevel := -1; FLastSelectionLevel := -1;
FSelectionBlendFactor := 128; FSelectionBlendFactor := 128;
FButtonSize := 9;
{$IF LCL_FullVersion >= 1080000}
FDefaultNodeHeight := Scale96ToFont(DEFAULT_NODE_HEIGHT);
FIndent := Scale96ToFont(DEFAULT_INDENT);
FMargin := Scale96ToFont(DEFAULT_MARGIN);
FTextMargin := Scale96ToFont(DEFAULT_MARGIN);
FDragHeight := Scale96ToFont(DEFAULT_DRAG_HEIGHT);
FDragWidth := Scale96ToFont(DEFAULT_DRAG_WIDTH);
{$ELSE}
FDefaultNodeHeight := DEFAULT_NODE_HEIGHT; FDefaultNodeHeight := DEFAULT_NODE_HEIGHT;
FIndent := DEFAULT_INDENT; FIndent := DEFAULT_INDENT;
FMargin := DEFAULT_MARGIN; FMargin := DEFAULT_MARGIN;
FTextMargin := DEFAULT_MARGIN; FTextMargin := DEFAULT_MARGIN;
FDragHeight := DEFAULT_DRAG_HEIGHT; FDragHeight := DEFAULT_DRAG_HEIGHT;
FDragWidth := DEFAULT_DRAG_WIDTH; FDragWidth := DEFAULT_DRAG_WIDTH;
{$IFEND}
FPlusBM := TBitmap.Create; FPlusBM := TBitmap.Create;
FHotPlusBM := TBitmap.Create; FHotPlusBM := TBitmap.Create;
@ -14067,11 +14035,7 @@ end;
function TBaseVirtualTree.IsDefaultNodeHeightStored: Boolean; function TBaseVirtualTree.IsDefaultNodeHeightStored: Boolean;
begin begin
{$IF LCL_FullVersion >= 1080000}
Result := FDefaultNodeHeight <> Scale96ToFont(DEFAULT_NODE_HEIGHT);
{$ELSE}
Result := FDefaultNodeHeight <> DEFAULT_NODE_HEIGHT; Result := FDefaultNodeHeight <> DEFAULT_NODE_HEIGHT;
{$IFEND}
end; end;
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
@ -14114,44 +14078,28 @@ end;
function TBaseVirtualTree.IsDragHeightStored: Boolean; function TBaseVirtualTree.IsDragHeightStored: Boolean;
begin begin
{$IF LCL_FullVersion >= 1080000}
Result := FDragHeight <> Scale96ToFont(DEFAULT_DRAG_HEIGHT);
{$ELSE}
Result := FDragHeight <> DEFAULT_DRAG_HEIGHT; Result := FDragHeight <> DEFAULT_DRAG_HEIGHT;
{$IFEND}
end; end;
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
function TBaseVirtualTree.IsDragWidthStored: Boolean; function TBaseVirtualTree.IsDragWidthStored: Boolean;
begin begin
{$IF LCL_FullVersion >= 1080000}
Result := FDragWidth <> Scale96ToFont(DEFAULT_DRAG_WIDTH);
{$ELSE}
Result := FDragWidth <> DEFAULT_DRAG_WIDTH; Result := FDragWidth <> DEFAULT_DRAG_WIDTH;
{$IFEND}
end; end;
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
function TBaseVirtualTree.IsIndentStored: Boolean; function TBaseVirtualTree.IsIndentStored: Boolean;
begin begin
{$IF LCL_FullVersion >= 1080000}
Result := FIndent <> Scale96ToFont(DEFAULT_INDENT);
{$ELSE}
Result := FIndent <> DEFAULT_INDENT; Result := FIndent <> DEFAULT_INDENT;
{$IFEND}
end; end;
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
function TBaseVirtualTree.IsMarginStored: Boolean; function TBaseVirtualTree.IsMarginStored: Boolean;
begin begin
{$IF LCL_FullVersion >= 1080000}
Result := FMargin <> Scale96ToFont(DEFAULT_MARGIN);
{$ELSE}
Result := FMargin <> DEFAULT_MARGIN; Result := FMargin <> DEFAULT_MARGIN;
{$IFEND}
end; end;
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
@ -14165,11 +14113,7 @@ end;
function TBaseVirtualTree.IsTextMarginStored: Boolean; function TBaseVirtualTree.IsTextMarginStored: Boolean;
begin begin
{$IF LCL_FullVersion >= 1080000}
Result := FTextMargin <> Scale96ToFont(DEFAULT_MARGIN);
{$ELSE}
Result := FTextMargin <> DEFAULT_MARGIN; Result := FTextMargin <> DEFAULT_MARGIN;
{$IFEND}
end; end;
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
@ -14396,10 +14340,11 @@ var
fmTransparent: fmTransparent:
canv.Brush.Style := bsClear; canv.Brush.Style := bsClear;
end; end;
canv.Pen.FPColor := TColorToFPColor(ColorToRGB(clWindowText)); canv.Pen.FPColor := TColorToFPColor(ColorToRGB(FColors.TreeLineColor)); //clWindowText));
m := c div 2; //FButtonSize div 2; //FButtonSize div 8; m := c div 2;
if m = 0 then m := 1; if m = 0 then m := 1;
canv.Rectangle(0, 0, img.Width, img.Height); canv.Rectangle(0, 0, img.Width, img.Height);
canv.Pen.FPColor := TColorToFPColor(ColorToRGB(clWindowText));
canv.Line(c-m, c, c+m, c); canv.Line(c-m, c, c+m, c);
if IsPlus then if IsPlus then
canv.Line(c, c-m, c, c+m); canv.Line(c, c-m, c, c+m);
@ -14444,8 +14389,9 @@ var
//--------------- end local function ---------------------------------------- //--------------- end local function ----------------------------------------
begin begin
Size.cx := FButtonSize; Size.cx := Scale96ToFont(9);
Size.cy := FButtonSize; if not odd(Size.cx) then dec(Size.cx);
Size.cy := Size.cx;
{$ifdef ThemeSupport} {$ifdef ThemeSupport}
{$ifdef LCLWin} {$ifdef LCLWin}
@ -14903,11 +14849,7 @@ procedure TBaseVirtualTree.SetDefaultNodeHeight(Value: Cardinal);
begin begin
if Value = 0 then if Value = 0 then
{$IF LCL_FullVersion >= 2000000}
Value := Scale96ToFont(DEFAULT_NODE_HEIGHT);
{$ELSE}
Value := DEFAULT_NODE_HEIGHT; Value := DEFAULT_NODE_HEIGHT;
{$IFEND}
if FDefaultNodeHeight <> Value then if FDefaultNodeHeight <> Value then
begin begin
Inc(Integer(FRoot.TotalHeight), Integer(Value) - Integer(FDefaultNodeHeight)); Inc(Integer(FRoot.TotalHeight), Integer(Value) - Integer(FDefaultNodeHeight));
@ -24355,11 +24297,7 @@ var
begin begin
{$ifdef DEBUG_VTV}Logger.EnterMethod([lcCheck],'PaintCheckImage');{$endif} {$ifdef DEBUG_VTV}Logger.EnterMethod([lcCheck],'PaintCheckImage');{$endif}
{$if LCL_FullVersion >= 1080000}
checkSize := Scale96ToFont(DEFAULT_CHECK_WIDTH);
{$else}
checkSize := DEFAULT_CHECK_WIDTH; checkSize := DEFAULT_CHECK_WIDTH;
{$ifend}
with ImageInfo do with ImageInfo do
begin begin
@ -26934,8 +26872,7 @@ begin
if IsDragWidthStored then if IsDragWidthStored then
FDragWidth := Round(FDragWidth * AXProportion); FDragWidth := Round(FDragWidth * AXProportion);
FHeader.AutoAdjustLayout(AXProportion, AYProportion); FHeader.AutoAdjustLayout(AXProportion, AYProportion);
FButtonSize := Round(FButtonSize * AXProportion); PrepareBitmaps(true, false);
if not Odd(FButtonSize) then dec(FButtonSize);
finally finally
EnableAutoSizing; EnableAutoSizing;
end; end;

View File

@ -2,11 +2,11 @@ object GeneralForm: TGeneralForm
Left = 291 Left = 291
Height = 536 Height = 536
Top = 185 Top = 185
Width = 804 Width = 817
ActiveControl = TreeFontButton ActiveControl = TreeFontButton
Caption = 'GeneralForm' Caption = 'GeneralForm'
ClientHeight = 536 ClientHeight = 536
ClientWidth = 804 ClientWidth = 817
KeyPreview = True KeyPreview = True
ShowHint = True ShowHint = True
LCLVersion = '3.99.0.0' LCLVersion = '3.99.0.0'
@ -15,7 +15,7 @@ object GeneralForm: TGeneralForm
AnchorSideLeft.Control = DrawSelectionModeRadioGroup AnchorSideLeft.Control = DrawSelectionModeRadioGroup
AnchorSideTop.Control = DrawSelectionModeRadioGroup AnchorSideTop.Control = DrawSelectionModeRadioGroup
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 575 Left = 588
Height = 15 Height = 15
Top = 387 Top = 387
Width = 113 Width = 113
@ -27,7 +27,7 @@ object GeneralForm: TGeneralForm
AnchorSideLeft.Control = CheckMarkCombo AnchorSideLeft.Control = CheckMarkCombo
AnchorSideTop.Control = CheckMarkCombo AnchorSideTop.Control = CheckMarkCombo
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 575 Left = 588
Height = 15 Height = 15
Top = 437 Top = 437
Width = 112 Width = 112
@ -41,7 +41,7 @@ object GeneralForm: TGeneralForm
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = SaveButton AnchorSideRight.Control = SaveButton
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 575 Left = 588
Height = 60 Height = 60
Top = 48 Top = 48
Width = 221 Width = 221
@ -53,10 +53,10 @@ object GeneralForm: TGeneralForm
end end
object VST2: TLazVirtualStringTree object VST2: TLazVirtualStringTree
AnchorSideRight.Control = Label8 AnchorSideRight.Control = Label8
Left = 5 Left = 11
Height = 523 Height = 523
Top = 8 Top = 8
Width = 562 Width = 569
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
AutoExpandDelay = 300 AutoExpandDelay = 300
BorderSpacing.Right = 8 BorderSpacing.Right = 8
@ -67,6 +67,7 @@ object GeneralForm: TGeneralForm
'Unicode text' 'Unicode text'
'Virtual Tree Data' 'Virtual Tree Data'
) )
Color = clBtnFace
Colors.BorderColor = clScrollBar Colors.BorderColor = clScrollBar
Colors.DropTargetColor = clActiveBorder Colors.DropTargetColor = clActiveBorder
Colors.DropTargetBorderColor = clActiveCaption Colors.DropTargetBorderColor = clActiveCaption
@ -83,7 +84,6 @@ object GeneralForm: TGeneralForm
item item
ImageIndex = 10 ImageIndex = 10
Position = 1 Position = 1
Spacing = 20
Text = 'Initial main column' Text = 'Initial main column'
Width = 300 Width = 300
end end
@ -100,10 +100,10 @@ object GeneralForm: TGeneralForm
ImageIndex = 4 ImageIndex = 4
Options = [coAllowClick, coEnabled, coParentColor, coResizable, coShowDropMark, coVisible, coAllowFocus] Options = [coAllowClick, coEnabled, coParentColor, coResizable, coShowDropMark, coVisible, coAllowFocus]
Position = 2 Position = 2
Spacing = 20
Text = 'Language column' Text = 'Language column'
Width = 300 Width = 300
end> end>
Header.Height = 32
Header.Options = [hoColumnResize, hoDblClickResize, hoDrag, hoHotTrack, hoShowHint, hoVisible] Header.Options = [hoColumnResize, hoDblClickResize, hoDrag, hoHotTrack, hoShowHint, hoVisible]
Header.ParentFont = True Header.ParentFont = True
Header.Style = hsFlatButtons Header.Style = hsFlatButtons
@ -138,7 +138,7 @@ object GeneralForm: TGeneralForm
AnchorSideLeft.Control = DrawSelectionModeRadioGroup AnchorSideLeft.Control = DrawSelectionModeRadioGroup
AnchorSideTop.Control = SwitchCheckImagesLabel AnchorSideTop.Control = SwitchCheckImagesLabel
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 575 Left = 588
Height = 23 Height = 23
Top = 404 Top = 404
Width = 211 Width = 211
@ -165,7 +165,7 @@ object GeneralForm: TGeneralForm
AnchorSideLeft.Control = SwitchMainColumnLabel AnchorSideLeft.Control = SwitchMainColumnLabel
AnchorSideTop.Control = SwitchMainColumnLabel AnchorSideTop.Control = SwitchMainColumnLabel
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 575 Left = 588
Height = 21 Height = 21
Top = 454 Top = 454
Width = 41 Width = 41
@ -182,7 +182,7 @@ object GeneralForm: TGeneralForm
object TreeFontButton: TBitBtn object TreeFontButton: TBitBtn
AnchorSideTop.Control = Owner AnchorSideTop.Control = Owner
AnchorSideRight.Control = SaveButton AnchorSideRight.Control = SaveButton
Left = 575 Left = 588
Height = 34 Height = 34
Hint = 'Pick a font to be used by this tree.' Hint = 'Pick a font to be used by this tree.'
Top = 8 Top = 8
@ -216,7 +216,7 @@ object GeneralForm: TGeneralForm
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = ThemeRadioGroup AnchorSideRight.Control = ThemeRadioGroup
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 575 Left = 588
Height = 93 Height = 93
Top = 204 Top = 204
Width = 221 Width = 221
@ -257,7 +257,7 @@ object GeneralForm: TGeneralForm
'transparent color' 'transparent color'
) )
Style = csDropDownList Style = csDropDownList
TabOrder = 3 TabOrder = 2
Text = 'tree''s background color' Text = 'tree''s background color'
OnChange = ButtonFillModeComboChange OnChange = ButtonFillModeComboChange
end end
@ -268,7 +268,7 @@ object GeneralForm: TGeneralForm
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = TreeButtonLookRadioGroup AnchorSideRight.Control = TreeButtonLookRadioGroup
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 575 Left = 588
Height = 70 Height = 70
Top = 307 Top = 307
Width = 221 Width = 221
@ -301,7 +301,7 @@ object GeneralForm: TGeneralForm
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = SaveButton AnchorSideRight.Control = SaveButton
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
Left = 575 Left = 588
Height = 70 Height = 70
Top = 124 Top = 124
Width = 221 Width = 221
@ -333,7 +333,7 @@ object GeneralForm: TGeneralForm
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = TreeFontButton AnchorSideBottom.Control = TreeFontButton
AnchorSideBottom.Side = asrBottom AnchorSideBottom.Side = asrBottom
Left = 700 Left = 713
Height = 34 Height = 34
Top = 8 Top = 8
Width = 96 Width = 96
@ -349,7 +349,7 @@ object GeneralForm: TGeneralForm
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = MainColumnUpDown AnchorSideTop.Control = MainColumnUpDown
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 624 Left = 637
Height = 15 Height = 15
Top = 457 Top = 457
Width = 98 Width = 98

View File

@ -426,11 +426,13 @@ begin
begin begin
VST2.TreeOptions.PaintOptions := VST2.TreeOptions.PaintOptions + [toShowTreeLines]; VST2.TreeOptions.PaintOptions := VST2.TreeOptions.PaintOptions + [toShowTreeLines];
VST2.ButtonStyle := bsRectangle; VST2.ButtonStyle := bsRectangle;
ButtonFillModeCombo.Enabled := (Sender as TRadioGroup).Enabled;
end end
else else
begin begin
VST2.TreeOptions.PaintOptions := VST2.TreeOptions.PaintOptions - [toShowTreeLines]; VST2.TreeOptions.PaintOptions := VST2.TreeOptions.PaintOptions - [toShowTreeLines];
VST2.ButtonStyle := bsTriangle; VST2.ButtonStyle := bsTriangle;
ButtonFillModeCombo.Enabled := false;
end; end;
end; end;