lcl: don't use ThemeServices for drawing node text if treeview is not themed

git-svn-id: trunk@24886 -
This commit is contained in:
paul 2010-04-24 17:01:07 +00:00
parent cc6a63ed9d
commit 1c2ac82980

View File

@ -4525,12 +4525,18 @@ var
Canvas.Brush.Color := FSelectedColor;
Canvas.Font.Color := InvertColor(Brush.Color);
Canvas.FillRect(NodeRect);
end;
end
else
if not (tvoThemedDraw in Options) then
Canvas.Font.Color := Font.Color;
end
else
Details := ThemeServices.GetElementDetails(ttItemNormal);
ThemeServices.DrawText(Canvas, Details, AText, NodeRect, DT_CENTER or DT_VCENTER, 0);
if (tvoThemedDraw in Options) then
ThemeServices.DrawText(Canvas, Details, AText, NodeRect, DT_CENTER or DT_VCENTER, 0)
else
DrawText(Canvas.Handle, PChar(AText), -1, NodeRect, DT_CENTER or DT_VCENTER);
end;