win32: use default theme manager for treeview parts drawing if OS < Vista

git-svn-id: trunk@24847 -
This commit is contained in:
paul 2010-04-23 07:56:18 +00:00
parent 8edd29a313
commit 0672755b94

View File

@ -331,6 +331,13 @@ var
begin
if ThemesEnabled then
begin
if (Details.Element = teTreeview) and (Details.Part = TVP_HOTGLYPH) and (WindowsVersion < wvVista) then
Details.Part := TVP_GLYPH;
if (Details.Element = teTreeview) and (Details.Part = TVP_TREEITEM) and (WindowsVersion < wvVista) then
begin
inherited;
Exit;
end;
with Details do
DrawThemeBackground(Theme[Element], DC, Part, State, R, ClipRect);
if (Details.Element = teToolTip) and (Details.Part = TTP_STANDARD) and (WindowsVersion < wvVista) then
@ -340,12 +347,6 @@ begin
Brush := CreateSolidBrush(ColorToRGB(clInfoBk));
FillRect(DC, ARect, Brush);
DeleteObject(Brush);
end
else
if (Details.Element = teTreeview) and (Details.Part = TVP_HOTGLYPH) and (WindowsVersion < wvVista) then
begin
Details.Part := TVP_GLYPH;
inherited;
end;
end
else