From 1c2ac82980b47ca1c69eccefd9f99683851b7e70 Mon Sep 17 00:00:00 2001 From: paul Date: Sat, 24 Apr 2010 17:01:07 +0000 Subject: [PATCH] lcl: don't use ThemeServices for drawing node text if treeview is not themed git-svn-id: trunk@24886 - --- lcl/include/treeview.inc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lcl/include/treeview.inc b/lcl/include/treeview.inc index eaa9bf6085..d057819338 100644 --- a/lcl/include/treeview.inc +++ b/lcl/include/treeview.inc @@ -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;