diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2011-10-27 16:52:02 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2011-10-27 16:52:02 +0200 |
commit | 30b2b785951719bb6a2db7e6b4523a145f7b0458 (patch) | |
tree | aaffbeb42f54dc61f539f133d456b869fa340208 /src/gui | |
parent | d2695ee087ef57be43207bc34c5c2dcd7df4fd18 (diff) | |
download | fpGUI-30b2b785951719bb6a2db7e6b4523a145f7b0458.tar.xz |
tree: improved the spacing / positioning of the node text inside the focus selection
The text was right on the left edge of the focus selection rectangle. Now
it is evenly spaced with 2px margin on each side.
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/fpg_tree.pas | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/fpg_tree.pas b/src/gui/fpg_tree.pas index 578cc133..be18e2a0 100644 --- a/src/gui/fpg_tree.pas +++ b/src/gui/fpg_tree.pas @@ -1078,7 +1078,7 @@ begin Result := 0 else begin - Result := FFont.TextWidth(ANode.Text) + 2; + Result := FFont.TextWidth(ANode.Text) + 4; if ShowImages and ((ImageList <> nil) or (StateImageList <> nil)) then begin if ImageList <> nil then @@ -1518,7 +1518,7 @@ begin // inherited HandlePaint; Canvas.ClearClipRect; - Canvas.Clear(FBackgroundColor); + Canvas.Clear(BackgroundColor); // Limit painting in the UI Designer if csDesigning in ComponentState then @@ -1646,7 +1646,7 @@ begin Canvas.FillRectangle(w + imgx - FXOffset, ACenterPos - (GetNodeHeight div 2), GetNodeWidth(h) - imgx, GetNodeHeight); end; - Canvas.DrawString(w + imgx - FXOffset, ACenterPos - (GetNodeHeight div 2), h.text); + Canvas.DrawString(w + imgx - FXOffset + 2 { small spacing }, ACenterPos - (GetNodeHeight div 2), h.text); Canvas.SetTextColor(h.ParentTextColor); Canvas.SetLineStyle(1, FTreeLineStyle); |