Skip to content

Commit 15f891d

Browse files
committed
Fix bug about tsUseExplorerTheme disactivated
1 parent 38c2c75 commit 15f891d

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

Source/VirtualTrees.pas

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14480,9 +14480,11 @@ procedure TBaseVirtualTree.PrepareBitmaps(NeedButtons, NeedLines: Boolean);
1448014480
end;
1448114481

1448214482
{$ifdef ThemeSupport}
14483-
// if Theme <> 0 then
14484-
// CloseThemeData(Theme);
14483+
{$ifdef Windows}
14484+
if Theme <> 0 then
14485+
CloseThemeData(Theme);
1448514486
{$endif}
14487+
{$endif ThemeSupport}
1448614488
end;
1448714489

1448814490
//----------------------------------------------------------------------------------------------------------------------
@@ -24798,7 +24800,7 @@ procedure TBaseVirtualTree.PrepareCell(var PaintInfo: TVTPaintInfo; WindowOrgX,
2479824800
if not IsRectEmpty(InnerRect) then
2479924801
{$ifdef ThemeSupport}
2480024802
{$ifdef Windows}
24801-
if Theme <> 0 then
24803+
if tsUseExplorerTheme in FStates then
2480224804
begin
2480324805
// If the node is also hot, its background will be drawn later.
2480424806
if not (toHotTrack in FOptions.FPaintOptions) or (Node <> FCurrentHotNode) or
@@ -24819,7 +24821,7 @@ procedure TBaseVirtualTree.PrepareCell(var PaintInfo: TVTPaintInfo; WindowOrgX,
2481924821

2482024822
{$ifdef ThemeSupport}
2482124823
{$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
2482324825
((Column = FCurrentHotColumn) or (toFullRowSelect in FOptions.FSelectionOptions)) then
2482424826
DrawBackground(IfThen((vsSelected in Node.States) and not (toAlwaysHideSelection in FOptions.FPaintOptions),
2482524827
TREIS_HOTSELECTED, TREIS_HOT));
@@ -24844,7 +24846,7 @@ procedure TBaseVirtualTree.PrepareCell(var PaintInfo: TVTPaintInfo; WindowOrgX,
2484424846
{$ifdef ThemeSupport}
2484524847
{$ifdef Windows}
2484624848
if not (toExtendedFocus in FOptions.FSelectionOptions) and (toFullRowSelect in FOptions.FSelectionOptions) and
24847-
(Theme <> 0) then
24849+
(tsUseExplorerTheme in FStates) then
2484824850
FocusRect := RowRect
2484924851
else
2485024852
{$endif}
@@ -24879,11 +24881,10 @@ procedure TBaseVirtualTree.PrepareCell(var PaintInfo: TVTPaintInfo; WindowOrgX,
2487924881
end;
2488024882
end;
2488124883
{$ifdef ThemeSupport}
24882-
//todo
24883-
{
24884-
if Theme <> 0 then
24884+
{$ifdef Windows}
24885+
if tsUseExplorerTheme in FStates then
2488524886
CloseThemeData(Theme);
24886-
}
24887+
{$endif}
2488724888
{$endif ThemeSupport}
2488824889
end;
2488924890

0 commit comments

Comments
 (0)