mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
Use MaxTextWidth instead of magic constants
This commit is contained in:
parent
639092352b
commit
44057a5005
2 changed files with 2 additions and 2 deletions
|
|
@ -2960,7 +2960,7 @@ begin
|
|||
begin
|
||||
PushPop(FElevate);
|
||||
try
|
||||
if FileHasLongLines(sFileName, 32768) then
|
||||
if FileHasLongLines(sFileName, gMaxTextWidth) then
|
||||
Result := False;
|
||||
finally
|
||||
PushPop(FElevate);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue