Use MaxTextWidth instead of magic constants

This commit is contained in:
Koen van de Sande 2026-04-24 14:32:56 +02:00
commit 44057a5005
2 changed files with 2 additions and 2 deletions

View file

@ -2960,7 +2960,7 @@ begin
begin
PushPop(FElevate);
try
if FileHasLongLines(sFileName, 32768) then
if FileHasLongLines(sFileName, gMaxTextWidth) then
Result := False;
finally
PushPop(FElevate);

View file

@ -107,7 +107,7 @@ begin
Canvas.Font.Size := FThumbBitmapSize.cy div 16;
// Estimate max visible characters per line from thumbnail width
MaxChars := FThumbBitmapSize.cx div Max(Canvas.TextWidth('M') div 2, 1);
MaxRead := 32768;
MaxRead := gMaxTextWidth * 8;
try
Stream:= TFileStreamEx.Create(FFileName, fmOpenRead or fmShareDenyNone);
try