From ac1050003a91deb64d5a93f3aa8f237e26853efb Mon Sep 17 00:00:00 2001 From: pascal Date: Tue, 21 Jul 2020 05:18:41 +0000 Subject: [PATCH] VTV: better fix for painting selection git-svn-id: trunk@63609 - --- components/virtualtreeview/laz.virtualtrees.pas | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/components/virtualtreeview/laz.virtualtrees.pas b/components/virtualtreeview/laz.virtualtrees.pas index 15a65b87c3..22b90c9861 100644 --- a/components/virtualtreeview/laz.virtualtrees.pas +++ b/components/virtualtreeview/laz.virtualtrees.pas @@ -24713,9 +24713,11 @@ begin RowRect := Rect(0, PaintInfo.CellRect.Top, FRangeX, PaintInfo.CellRect.Bottom); if (Header.Columns.Count = 0) and (toFullRowSelect in TreeOptions.SelectionOptions) then RowRect.Right := Max(ClientWidth, RowRect.Right); - if toShowVertGridLines in FOptions.PaintOptions then - Dec(RowRect.Right); - end; + if toShowVertGridLines in FOptions.PaintOptions then + Dec(RowRect.Right); + end + else + Theme := 0; {$endif} {$endif ThemeSupport} @@ -24811,7 +24813,7 @@ begin if not IsRectEmpty(InnerRect) then {$ifdef ThemeSupport} {$ifdef Windows} - if (tsUseExplorerTheme in FStates) and (Theme <> 0) then + if Theme <> 0 then begin // If the node is also hot, its background will be drawn later. if not (toHotTrack in FOptions.FPaintOptions) or (Node <> FCurrentHotNode) or