mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-01 22:20:19 +02:00
SynCompletion: Fix crash, if callback not assigned (sizegrip) issue #17898, fix showing sizegrip
git-svn-id: trunk@28177 -
This commit is contained in:
parent
230fc8baf9
commit
16a309b442
@ -179,6 +179,7 @@ type
|
||||
property DrawBorderWidth: Integer read FDrawBorderWidth write SetDrawBorderWidth;
|
||||
procedure IncHintLock;
|
||||
procedure DecHintLock;
|
||||
procedure DoOnDragResize(Sender: TObject);
|
||||
public
|
||||
constructor Create(AOwner: Tcomponent); override;
|
||||
destructor Destroy; override;
|
||||
@ -460,7 +461,7 @@ begin
|
||||
if (FWinSize.x <> TSynBaseCompletionForm(Owner).Width) or
|
||||
(FWinSize.y <> TSynBaseCompletionForm(Owner).Height)
|
||||
then
|
||||
TSynBaseCompletionForm(Owner).OnDragResized(Owner);
|
||||
TSynBaseCompletionForm(Owner).DoOnDragResize(Owner);
|
||||
end;
|
||||
|
||||
constructor TSynBaseCompletionFormSizeDrag.Create(TheOwner: TComponent);
|
||||
@ -525,6 +526,7 @@ begin
|
||||
SizeDrag.AnchorSideBottom.Control := Self;
|
||||
SizeDrag.Height := Max(7, abs(Font.Height) * 2 div 3);
|
||||
SizeDrag.Cursor := crSizeNWSE;
|
||||
SizeDrag.Visible := False;
|
||||
|
||||
SizeDrag.OnKeyPress:=@SDKeyPress;
|
||||
SizeDrag.OnKeyDown:=@SDKeyDown;
|
||||
@ -1054,6 +1056,10 @@ begin
|
||||
NbLinesInWindow := NbLinesInWindow;
|
||||
Scroll.BorderSpacing.Top := FDrawBorderWidth;
|
||||
Scroll.BorderSpacing.Right := FDrawBorderWidth;
|
||||
if SizeDrag.Visible then
|
||||
Scroll.BorderSpacing.Bottom := 0
|
||||
else
|
||||
Scroll.BorderSpacing.Bottom := FDrawBorderWidth;
|
||||
SizeDrag.BorderSpacing.Right := FDrawBorderWidth;
|
||||
SizeDrag.BorderSpacing.Bottom := FDrawBorderWidth;
|
||||
end;
|
||||
@ -1088,6 +1094,12 @@ begin
|
||||
ShowItemHint(Position);
|
||||
end;
|
||||
|
||||
procedure TSynBaseCompletionForm.DoOnDragResize(Sender: TObject);
|
||||
begin
|
||||
if assigned(FOnDragResized) then
|
||||
FOnDragResized(Sender);
|
||||
end;
|
||||
|
||||
procedure TSynBaseCompletionForm.SetItemList(const Value: TStrings);
|
||||
begin
|
||||
FItemList.Assign(Value);
|
||||
|
Loading…
Reference in New Issue
Block a user