Skip to content

Commit

Permalink
Fix non-ghosted icons in database tree, temporarily in VirtualTrees.U…
Browse files Browse the repository at this point in the history
…tils.pas. The right place for that fix would be in TVirtualImageList.DoDraw. Closes #1045
  • Loading branch information
ansgarbecker committed Jun 6, 2020
1 parent 96c16f1 commit 32f399a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/virtualtreeview/Source/VirtualTrees.Utils.pas
Expand Up @@ -1282,7 +1282,10 @@ procedure DrawImage(ImageList: TCustomImageList; Index: Integer; Canvas: TCanvas

begin
if Enabled then
TCustomImageListCast(ImageList).DoDraw(Index, Canvas, X, Y, Style, Enabled)
// HeidiSQL fix for #1045, required until Embarcadero fixes TVirtualImageList.DoDraw:
//TCustomImageListCast(ImageList).DoDraw(Index, Canvas, X, Y, Style, Enabled)
ImageList_DrawEx(ImageList.Handle, Index, Canvas.Handle, X, Y, 0, 0,
GetRGBColor(ImageList.BkColor), GetRGBColor(ImageList.BlendColor), Style)
else
DrawDisabledImage(ImageList, Canvas, X, Y, Index);
end;
Expand Down

0 comments on commit 32f399a

Please sign in to comment.