mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 11:17:57 +08:00
High DPI code enhancement: Enable TreeOptions.AutoOptions.toAutoChangeScale flag on all VirtualTrees, and remove code which did that scaling programmatically. Probably only working with the new version of VirtualTree.
This commit is contained in:
@ -1459,15 +1459,9 @@ end;
|
||||
|
||||
procedure FixVT(VT: TVirtualStringTree; MultiLineCount: Word=1);
|
||||
var
|
||||
SingleLineHeight: Integer;
|
||||
Node: PVirtualNode;
|
||||
begin
|
||||
// Resize hardcoded node height to work with different DPI settings
|
||||
VT.BeginUpdate;
|
||||
SingleLineHeight := GetTextHeight(VT.Font);
|
||||
VT.DefaultNodeHeight := SingleLineHeight * MultiLineCount + 5;
|
||||
// The header needs slightly more height than the normal nodes
|
||||
VT.Header.Height := Trunc(SingleLineHeight * 1.5);
|
||||
// Apply new height to multi line grid nodes
|
||||
Node := VT.GetFirstInitialized;
|
||||
while Assigned(Node) do begin
|
||||
|
Reference in New Issue
Block a user