jdp1024

Results 20 comments of jdp1024

> Normally the `Stretch` function is not called at all. Thumbnails are generated using WinAPI (IShellItemImageFactory) which is fast. I don't know why `Stretch` function is used in your case....

> I would prefer to make this a separate unit (swscale). [@jdp1024](https://github.com/jdp1024) are MIT/LGPL license good for you? Yes it's good for me.

> but why should the filelist font be used there and not the system one? after all, in addition to the full view there is also a brief and thumbnail...

> f.PixelsPerInch, Canvas.Font.PixelsPerInch ![Image](https://github.com/user-attachments/assets/89134f8b-000f-4ac1-aa9e-5bd37d569faf)

@alexx2000 Replacing `Font.Size := ColumnsSet.GetColumnFontSize(ACol);` with `Canvas.Font.Height := -MulDiv(ColumnsSet.GetColumnFontSize(ACol), ScreenInfo.PixelsPerInchY, 72);` is a way to work around. Another solution is to add ``` PixelsPerInch := ScreenInfo.PixelsPerInchX; DesignTimePPI := PixelsPerInch; ```...

> frmMain.PixelsPerInch ![Image](https://github.com/user-attachments/assets/525231b4-7d5b-433a-9cb0-0787629c2b5e)

The font is not re-created if `Canvas.Font.Size` is set to the same value even its `Height` needs to be recalculated. I added ``` Font.Size := 0; ``` before the end...

> This code should have a same effect: > > `Canvas.Font.Size := ColumnsSet.GetColumnFontSize(ACol);` > > and > > `Canvas.Font.Height := -MulDiv(ColumnsSet.GetColumnFontSize(ACol), ScreenInfo.PixelsPerInchY, 72);` In `TDrawGridEx.Create` and `TColumnsFileView.CreateDefault` after setting `Canvas.Font.Size...

@alexx2000 It is not a DC bug, but an LCL bug. I have created a minimal project (zipped as [bug.zip](https://github.com/user-attachments/files/18644266/bug.zip)) to reproduce the problem, when a `TDrawGrid` control is contained...

@alexx2000 Thanks for the fix. The text of the preview thumbnails is incorrect: they are system font but italic, not following the setting of the main thumbnail view.