ideintf/ImageListEditor: Less truncation of loaded large images.

(cherry picked from commit ac784af64b)
This commit is contained in:
wp_xyz 2021-12-19 00:29:11 +01:00 committed by Maxim Ganetsky
parent 05d329b0db
commit 2bd584904e

View File

@ -612,7 +612,9 @@ var
ItemHeight, MaxHeight: Integer;
begin
ItemHeight := ImageListBox.Canvas.TextHeight('Hg');
MaxHeight := Scale96ToFont(32);
if ImageList.ResolutionCount > 0 then // smallest image will not be truncated
ItemHeight := Max(ItemHeight, ImageList.ResolutionByIndex[0].Height);
MaxHeight := Scale96ToFont(32); // max height above with next sizes will be truncated
for R in ImageList.Resolutions do
begin
if R.Height <= MaxHeight then