mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Viewer - wrong text wrapping (fixes #2183)
(cherry picked from commit 0c47b49589)
This commit is contained in:
parent
aa50acce68
commit
cc4fffc980
1 changed files with 6 additions and 2 deletions
|
|
@ -689,6 +689,8 @@ begin
|
|||
end;
|
||||
|
||||
procedure TViewerControl.Paint;
|
||||
var
|
||||
AText: String;
|
||||
begin
|
||||
if not IsFileOpen then
|
||||
begin
|
||||
|
|
@ -712,8 +714,10 @@ begin
|
|||
|
||||
if FViewerControlMode = vcmBook then
|
||||
FTextWidth := ((ClientWidth - (Canvas.TextWidth('W') * FColCount)) div FColCount)
|
||||
else
|
||||
FTextWidth := ClientWidth div Canvas.TextWidth('W') - 2;
|
||||
else begin
|
||||
AText := StringOfChar('W', FMaxTextWidth);
|
||||
FTextWidth := Canvas.TextFitInfo(AText, GetViewerRect.Width - FLeftMargin);
|
||||
end;
|
||||
|
||||
FLineList.Clear;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue