@@ -14480,9 +14480,11 @@ procedure TBaseVirtualTree.PrepareBitmaps(NeedButtons, NeedLines: Boolean);
14480
14480
end;
14481
14481
14482
14482
{$ifdef ThemeSupport}
14483
- // if Theme <> 0 then
14484
- // CloseThemeData(Theme);
14483
+ {$ifdef Windows}
14484
+ if Theme <> 0 then
14485
+ CloseThemeData(Theme);
14485
14486
{$endif}
14487
+ {$endif ThemeSupport}
14486
14488
end;
14487
14489
14488
14490
//----------------------------------------------------------------------------------------------------------------------
@@ -24798,7 +24800,7 @@ procedure TBaseVirtualTree.PrepareCell(var PaintInfo: TVTPaintInfo; WindowOrgX,
24798
24800
if not IsRectEmpty(InnerRect) then
24799
24801
{$ifdef ThemeSupport}
24800
24802
{$ifdef Windows}
24801
- if Theme <> 0 then
24803
+ if tsUseExplorerTheme in FStates then
24802
24804
begin
24803
24805
// If the node is also hot, its background will be drawn later.
24804
24806
if not (toHotTrack in FOptions.FPaintOptions) or (Node <> FCurrentHotNode) or
@@ -24819,7 +24821,7 @@ procedure TBaseVirtualTree.PrepareCell(var PaintInfo: TVTPaintInfo; WindowOrgX,
24819
24821
24820
24822
{$ifdef ThemeSupport}
24821
24823
{$ifdef Windows}
24822
- if (Theme <> 0 ) and (toHotTrack in FOptions.FPaintOptions) and (Node = FCurrentHotNode) and
24824
+ if (tsUseExplorerTheme in FStates ) and (toHotTrack in FOptions.FPaintOptions) and (Node = FCurrentHotNode) and
24823
24825
((Column = FCurrentHotColumn) or (toFullRowSelect in FOptions.FSelectionOptions)) then
24824
24826
DrawBackground(IfThen((vsSelected in Node.States) and not (toAlwaysHideSelection in FOptions.FPaintOptions),
24825
24827
TREIS_HOTSELECTED, TREIS_HOT));
@@ -24844,7 +24846,7 @@ procedure TBaseVirtualTree.PrepareCell(var PaintInfo: TVTPaintInfo; WindowOrgX,
24844
24846
{$ifdef ThemeSupport}
24845
24847
{$ifdef Windows}
24846
24848
if not (toExtendedFocus in FOptions.FSelectionOptions) and (toFullRowSelect in FOptions.FSelectionOptions) and
24847
- (Theme <> 0 ) then
24849
+ (tsUseExplorerTheme in FStates ) then
24848
24850
FocusRect := RowRect
24849
24851
else
24850
24852
{$endif}
@@ -24879,11 +24881,10 @@ procedure TBaseVirtualTree.PrepareCell(var PaintInfo: TVTPaintInfo; WindowOrgX,
24879
24881
end;
24880
24882
end;
24881
24883
{$ifdef ThemeSupport}
24882
- //todo
24883
- {
24884
- if Theme <> 0 then
24884
+ {$ifdef Windows}
24885
+ if tsUseExplorerTheme in FStates then
24885
24886
CloseThemeData(Theme);
24886
- }
24887
+ {$endif }
24887
24888
{$endif ThemeSupport}
24888
24889
end;
24889
24890
0 commit comments