Skip to content
Permalink
Browse files

Set bold text for database tree nodes in focused path. Related to #785

  • Loading branch information...
ansgarbecker committed Nov 1, 2019
1 parent 3b77da0 commit 91989233f5c6a572eb2e709b2236c3e09daa771c
Showing with 13 additions and 0 deletions.
  1. +13 −0 source/main.pas
@@ -8891,13 +8891,26 @@ procedure TMainForm.DBtreePaintText(Sender: TBaseVirtualTree; const
TVSTTextType);
var
DBObj: PDBObject;
WalkNode: PVirtualNode;
begin
// Grey out non-current connection nodes, and rather unimportant "Size" column
DBObj := Sender.GetNodeData(Node);
if DBObj.Connection <> ActiveConnection then
TargetCanvas.Font.Color := clGrayText
else if (Column = 1) and (DBObj.NodeType in [lntTable..lntEvent]) then
TargetCanvas.Font.Color := clGrayText;

// Set bold text if painted node is in focused path
if (Column = Sender.Header.MainColumn) then begin
WalkNode := Sender.FocusedNode;
while WalkNode <> nil do begin
if WalkNode = Node then begin
TargetCanvas.Font.Style := TargetCanvas.Font.Style + [fsBold];
Break;
end;
WalkNode := Sender.NodeParent[WalkNode];
end;
end;
end;


0 comments on commit 9198923

Please sign in to comment.
You can’t perform that action at this time.