mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 01:16:01 +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;
|
||||
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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user