mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-18 09:39:43 +02:00
SynEdit: fix resize (use clientheight)
git-svn-id: trunk@25914 -
This commit is contained in:
parent
d940f2e95a
commit
e7d50c5f39
@ -372,7 +372,7 @@ type
|
||||
fLinesInWindow: Integer;// MG: fully visible lines in window
|
||||
fLeftChar: Integer; // first visible screen column
|
||||
fMaxLeftChar: Integer; // 1024
|
||||
FOldWitdth, FOldHeight: Integer;
|
||||
FOldWidth, FOldHeight: Integer;
|
||||
|
||||
FPaintLock: Integer;
|
||||
FPaintLockOwnerCnt: Integer;
|
||||
@ -1576,7 +1576,7 @@ begin
|
||||
FCaret.Lines := FTheLinesView;
|
||||
FInternalCaret.Lines := FTheLinesView;
|
||||
FFontDummy := TFont.Create;
|
||||
FOldWitdth := -1;
|
||||
FOldWidth := -1;
|
||||
FOldHeight := -1;
|
||||
|
||||
with TSynEditStringList(fLines) do begin
|
||||
@ -4530,9 +4530,9 @@ end;
|
||||
procedure TCustomSynEdit.Resize;
|
||||
begin
|
||||
inherited;
|
||||
if (not HandleAllocated) or ((Width = FOldWitdth) and (Height = FOldHeight)) then exit;
|
||||
FOldWitdth := Width;
|
||||
FOldHeight := Height;
|
||||
if (not HandleAllocated) or ((ClientWidth = FOldWidth) and (ClientHeight = FOldHeight)) then exit;
|
||||
FOldWidth := ClientWidth;
|
||||
FOldHeight := ClientHeight;
|
||||
SizeOrFontChanged(FALSE);
|
||||
if sfEnsureCursorPosAtResize in fStateFlags then
|
||||
EnsureCursorPosVisible;
|
||||
|
Loading…
Reference in New Issue
Block a user