mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 16:00:16 +02:00
LCL: fixed TreeItem text is centered instead of left justified. issue #34461
git-svn-id: trunk@59647 -
This commit is contained in:
parent
a6491caa33
commit
5238df969e
@ -5237,10 +5237,11 @@ var
|
|||||||
Canvas.Font.Color := FHotTrackColor;
|
Canvas.Font.Color := FHotTrackColor;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
NodeRect.Offset(ScaleX(2, 96), 0);
|
||||||
if (tvoThemedDraw in Options) then
|
if (tvoThemedDraw in Options) then
|
||||||
ThemeServices.DrawText(Canvas, Details, AText, NodeRect, DT_CENTER or DT_VCENTER or DT_SINGLELINE or DT_NOPREFIX, 0)
|
ThemeServices.DrawText(Canvas, Details, AText, NodeRect, DT_LEFT or DT_VCENTER or DT_SINGLELINE or DT_NOPREFIX, 0)
|
||||||
else
|
else
|
||||||
DrawText(Canvas.Handle, PChar(AText), -1, NodeRect, DT_CENTER or DT_VCENTER or DT_SINGLELINE or DT_NOPREFIX);
|
DrawText(Canvas.Handle, PChar(AText), -1, NodeRect, DT_LEFT or DT_VCENTER or DT_SINGLELINE or DT_NOPREFIX);
|
||||||
|
|
||||||
if NeedUnderline then
|
if NeedUnderline then
|
||||||
begin
|
begin
|
||||||
@ -5363,7 +5364,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
CurTextRect := NodeRect;
|
CurTextRect := NodeRect;
|
||||||
CurTextRect.Left := x;
|
CurTextRect.Left := x;
|
||||||
CurTextRect.Right := x + TextWidth(Node.Text) + RealIndent div 2;
|
CurTextRect.Right := x + TextWidth(Node.Text) + (FDefItemSpace * 2);
|
||||||
DrawNodeText(NodeSelected, CurTextRect, Node.Text);
|
DrawNodeText(NodeSelected, CurTextRect, Node.Text);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user