Commit 5238df96 authored by Željan Rikalo's avatar Željan Rikalo 🏊🏼
Browse files

LCL: fixed TreeItem text is centered instead of left justified. issue #34461

git-svn-id: trunk@59647 -
parent a6491caa
......@@ -5237,10 +5237,11 @@ var
Canvas.Font.Color := FHotTrackColor;
end;
NodeRect.Offset(ScaleX(2, 96), 0);
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
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
begin
......@@ -5363,7 +5364,7 @@ begin
begin
CurTextRect := NodeRect;
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);
end;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment