VTV: fix selected node when tsUseExplorerTheme is disabled. Issue #37404, patch by Matteo Salvi.

git-svn-id: trunk@63658 -
This commit is contained in:
pascal 2020-07-27 06:19:30 +00:00
parent c5d98711e5
commit 638a405de0

View File

@ -14491,9 +14491,11 @@ begin
end; end;
{$ifdef ThemeSupport} {$ifdef ThemeSupport}
// if Theme <> 0 then {$ifdef Windows}
// CloseThemeData(Theme); if tsUseThemes in FStates then
CloseThemeData(Theme);
{$endif} {$endif}
{$endif ThemeSupport}
end; end;
//---------------------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------------------
@ -24715,9 +24717,7 @@ begin
RowRect.Right := Max(ClientWidth, RowRect.Right); RowRect.Right := Max(ClientWidth, RowRect.Right);
if toShowVertGridLines in FOptions.PaintOptions then if toShowVertGridLines in FOptions.PaintOptions then
Dec(RowRect.Right); Dec(RowRect.Right);
end end;
else
Theme := 0;
{$endif} {$endif}
{$endif ThemeSupport} {$endif ThemeSupport}
@ -24813,7 +24813,7 @@ begin
if not IsRectEmpty(InnerRect) then if not IsRectEmpty(InnerRect) then
{$ifdef ThemeSupport} {$ifdef ThemeSupport}
{$ifdef Windows} {$ifdef Windows}
if Theme <> 0 then if tsUseExplorerTheme in FStates then
begin begin
// If the node is also hot, its background will be drawn later. // If the node is also hot, its background will be drawn later.
if not (toHotTrack in FOptions.FPaintOptions) or (Node <> FCurrentHotNode) or if not (toHotTrack in FOptions.FPaintOptions) or (Node <> FCurrentHotNode) or
@ -24834,7 +24834,7 @@ begin
{$ifdef ThemeSupport} {$ifdef ThemeSupport}
{$ifdef Windows} {$ifdef Windows}
if (Theme <> 0) and (toHotTrack in FOptions.FPaintOptions) and (Node = FCurrentHotNode) and if (tsUseExplorerTheme in FStates) and (toHotTrack in FOptions.FPaintOptions) and (Node = FCurrentHotNode) and
((Column = FCurrentHotColumn) or (toFullRowSelect in FOptions.FSelectionOptions)) then ((Column = FCurrentHotColumn) or (toFullRowSelect in FOptions.FSelectionOptions)) then
DrawBackground(IfThen((vsSelected in Node.States) and not (toAlwaysHideSelection in FOptions.FPaintOptions), DrawBackground(IfThen((vsSelected in Node.States) and not (toAlwaysHideSelection in FOptions.FPaintOptions),
TREIS_HOTSELECTED, TREIS_HOT)); TREIS_HOTSELECTED, TREIS_HOT));
@ -24859,7 +24859,7 @@ begin
{$ifdef ThemeSupport} {$ifdef ThemeSupport}
{$ifdef Windows} {$ifdef Windows}
if not (toExtendedFocus in FOptions.FSelectionOptions) and (toFullRowSelect in FOptions.FSelectionOptions) and if not (toExtendedFocus in FOptions.FSelectionOptions) and (toFullRowSelect in FOptions.FSelectionOptions) and
(Theme <> 0) then (tsUseExplorerTheme in FStates) then
FocusRect := RowRect FocusRect := RowRect
else else
{$endif} {$endif}
@ -24894,11 +24894,10 @@ begin
end; end;
end; end;
{$ifdef ThemeSupport} {$ifdef ThemeSupport}
//todo {$ifdef Windows}
{ if tsUseExplorerTheme in FStates then
if Theme <> 0 then
CloseThemeData(Theme); CloseThemeData(Theme);
} {$endif}
{$endif ThemeSupport} {$endif ThemeSupport}
end; end;