Browse Source

Bug fix: Overlay images were not drawn in icons view when Name column in Details view was too narrow

Source commit: 25c862623765109e94f257d21bf78128484e97fc
Martin Prikryl 1 year ago
parent
commit
5ce8876c93
1 changed files with 3 additions and 3 deletions
  1. 3 3
      source/packages/filemng/CustomDirView.pas

+ 3 - 3
source/packages/filemng/CustomDirView.pas

@@ -988,7 +988,8 @@ procedure TCustomDirView.CNNotify(var Message: TWMNotify);
       Image := Image shr 1;
     end;
 
-    if 8 + OverlayImages.Width <= Columns[0].Width then
+    if (ViewStyle <> vsReport) or
+       (8 + OverlayImages.Width <= Columns[0].Width) then
     begin
       ImageList_Draw(OverlayImages.Handle, Index, DC, Point.X, Point.Y, ILD_TRANSPARENT);
     end;
@@ -1073,8 +1074,7 @@ begin
     try
       Message.Result := Message.Result or CDRF_NOTIFYPOSTPAINT;
       if (Nmcd.dwDrawStage = CDDS_ITEMPOSTPAINT) and
-         ((Nmcd.dwDrawStage and CDDS_SUBITEM) = 0) and
-         Assigned(Columns[0]) and (Columns[0].Width > 0) then
+         ((Nmcd.dwDrawStage and CDDS_SUBITEM) = 0) then
       begin
         Item := Items[Nmcd.dwItemSpec];
         Assert(Assigned(Item));