Index: src/newdesign/ucolumnsfileview.pas
===================================================================
--- src/newdesign/ucolumnsfileview.pas	(revision 4188)
+++ src/newdesign/ucolumnsfileview.pas	(working copy)
@@ -3314,17 +3314,10 @@
   end; //of DrawOtherCell
   //------------------------------------------------------
 
-  procedure PrepareColors;
-  //------------------------------------------------------
+  procedure DrawBackground;
   var
-    TextColor: TColor = -1;
     BackgroundColor: TColor;
-  //---------------------
   begin
-    Canvas.Font.Name   := ColumnsSet.GetColumnFontName(ACol);
-    Canvas.Font.Size   := ColumnsSet.GetColumnFontSize(ACol);
-    Canvas.Font.Style  := ColumnsSet.GetColumnFontStyle(ACol);
-
     // Set up default background color first.
     if (gdSelected in aState) and ColumnsView.Active and (not gUseFrameCursor) then
       BackgroundColor := ColumnsSet.GetColumnCursorColor(ACol)
@@ -3336,7 +3329,26 @@
         else
           BackgroundColor := ColumnsSet.GetColumnBackground2(ACol);
       end;
+    if gUseInvertedSelection and not
+       ((gdSelected in aState) and ColumnsView.Active and (not gUseFrameCursor))
+    then
+      BackgroundColor := ColumnsSet.GetColumnMarkColor(ACol);
 
+    // Draw background.
+    Canvas.Brush.Color := ColumnsView.DimColor(BackgroundColor);
+    Canvas.FillRect(aRect);
+  end;
+
+  procedure PrepareColors;
+  //------------------------------------------------------
+  var
+    TextColor: TColor = -1;
+  //---------------------
+  begin
+    Canvas.Font.Name   := ColumnsSet.GetColumnFontName(ACol);
+    Canvas.Font.Size   := ColumnsSet.GetColumnFontSize(ACol);
+    Canvas.Font.Style  := ColumnsSet.GetColumnFontStyle(ACol);
+
     // Set text color.
     if ColumnsSet.GetColumnOvercolor(ACol) then
       TextColor := gColorExt.GetColorBy(AFile.FSFile);
@@ -3354,7 +3366,6 @@
             end
           else
             begin
-              BackgroundColor := ColumnsSet.GetColumnMarkColor(ACol);
               Canvas.Font.Color := ColumnsSet.GetColumnBackground(ACol);
             end;
           //------------------------------------------------------
@@ -3372,10 +3383,6 @@
       begin
         Canvas.Font.Color := TextColor;
       end;
-
-    // Draw background.
-    Canvas.Brush.Color := ColumnsView.DimColor(BackgroundColor);
-    Canvas.FillRect(aRect);
   end;// of PrepareColors;
 
   procedure DrawLines;
@@ -3407,19 +3414,23 @@
   begin
     DrawFixed  // Draw column headers
   end
-  else if ColumnsView.FFiles.Count > 0 then
+  else
   begin
-    AFile := ColumnsView.FFiles[ARow - FixedRows]; // substract fixed rows (header)
-    FileSourceDirectAccess := fspDirectAccess in ColumnsView.FileSource.Properties;
+    DrawBackground;
+    if ColumnsView.FFiles.Count > 0 then
+    begin
+      AFile := ColumnsView.FFiles[ARow - FixedRows]; // substract fixed rows (header)
+      FileSourceDirectAccess := fspDirectAccess in ColumnsView.FileSource.Properties;
 
-    PrepareColors;
+      PrepareColors;
 
-    iTextTop := aRect.Top + (RowHeights[aRow] - Canvas.TextHeight('Wg')) div 2;
+      iTextTop := aRect.Top + (RowHeights[aRow] - Canvas.TextHeight('Wg')) div 2;
 
-    if ACol = 0 then
-      DrawIconCell  // Draw icon in the first column
-    else
-      DrawOtherCell;
+      if ACol = 0 then
+        DrawIconCell  // Draw icon in the first column
+      else
+        DrawOtherCell;
+    end;
   end;
 
   DrawCellGrid(aCol,aRow,aRect,aState);
@@ -3895,4 +3906,4 @@
 end;
 
 end.
-+
