From ca726ca567b8ec004783366b2a489b7b8e658375 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Thu, 4 Sep 2008 19:22:35 +0000 Subject: [PATCH] Normalize node heights in dbtree and all other virtual trees, make them slightly less high. Keeping 120 DPI compatibility for editing boxes. Cosmetic todo: Fix Vista selection colors and tree collapse/expand buttons --- source/childwin.dfm | 2 -- source/helpers.pas | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/source/childwin.dfm b/source/childwin.dfm index 5cbb663b..8bc08677 100644 --- a/source/childwin.dfm +++ b/source/childwin.dfm @@ -66,12 +66,10 @@ object MDIChild: TMDIChild Images = MainForm.PngImageListMain IncrementalSearch = isInitializedOnly Indent = 16 - Margin = 2 ParentShowHint = False PopupMenu = popupTreeView ShowHint = True TabOrder = 0 - TextMargin = 2 TreeOptions.AutoOptions = [toAutoDropExpand, toAutoTristateTracking, toAutoDeleteMovedNodes] TreeOptions.PaintOptions = [toHotTrack, toShowButtons, toShowDropmark, toShowTreeLines, toThemeAware, toUseBlendedImages] TreeOptions.SelectionOptions = [toRightClickSelect] diff --git a/source/helpers.pas b/source/helpers.pas index 812de899..234953f3 100644 --- a/source/helpers.pas +++ b/source/helpers.pas @@ -2630,7 +2630,7 @@ begin // Vist font fix: VT.Header doesn't have a ParentFont property, so we apply the font manually InheritFont(VT.Header.Font); // Resize hardcoded node height to work with different DPI settings - newHeight := VT.Canvas.TextHeight('A') + VT.TextMargin*2; + newHeight := VT.Canvas.TextHeight('A') + 6; VT.DefaultNodeHeight := newHeight; VT.Header.Height := newHeight; end;