mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-13 21:19:18 +02:00
IDE: Made Source-Editor-Completion form resizeable . issue #0016835
git-svn-id: trunk@27999 -
This commit is contained in:
parent
165f3a6807
commit
47e2718101
@ -162,6 +162,9 @@ type
|
||||
FHideIDEOnRun: boolean;
|
||||
FHideMessagesIcons: boolean;
|
||||
FComponentPaletteVisible: boolean;
|
||||
// CompletionWindow
|
||||
FCompletionWindowWidth: Integer;
|
||||
FCompletionWindowHeight: Integer;
|
||||
|
||||
// designer
|
||||
FCreateComponentFocusNameProperty: boolean;
|
||||
@ -342,6 +345,11 @@ type
|
||||
property IDESpeedButtonsVisible: boolean read FIDESpeedButtonsVisible
|
||||
write FIDESpeedButtonsVisible;
|
||||
|
||||
property CompletionWindowWidth: Integer read FCompletionWindowWidth
|
||||
write FCompletionWindowWidth;
|
||||
property CompletionWindowHeight: Integer read FCompletionWindowHeight
|
||||
write FCompletionWindowHeight;
|
||||
|
||||
// EnvironmentOptionsDialog editor
|
||||
property ShowBorderSpacing: boolean read FShowBorderSpacing write FShowBorderSpacing;
|
||||
property ShowGrid: boolean read FShowGrid write FShowGrid;
|
||||
@ -930,6 +938,10 @@ begin
|
||||
Path+'Desktop/ComponentPaletteVisible/Value',true);
|
||||
FIDESpeedButtonsVisible:=XMLConfig.GetValue(
|
||||
Path+'Desktop/IDESpeedButtonsVisible/Value',true);
|
||||
FCompletionWindowWidth:=XMLConfig.GetValue(
|
||||
Path+'Desktop/CompletionWindowWidth/Value', 320);
|
||||
FCompletionWindowHeight:=XMLConfig.GetValue(
|
||||
Path+'Desktop/CompletionWindowHeight/Value', 6);
|
||||
|
||||
// EnvironmentOptionsDialog editor
|
||||
FShowGrid:=XMLConfig.GetValue(
|
||||
@ -1250,6 +1262,10 @@ begin
|
||||
FComponentPaletteVisible,true);
|
||||
XMLConfig.SetDeleteValue(Path+'Desktop/IDESpeedButtonsVisible/Value',
|
||||
FIDESpeedButtonsVisible,true);
|
||||
XMLConfig.SetDeleteValue(Path+'Desktop/CompletionWindowWidth/Value',
|
||||
FCompletionWindowWidth, 320);
|
||||
XMLConfig.SetDeleteValue(Path+'Desktop/CompletionWindowHeight/Value',
|
||||
FCompletionWindowHeight, 6);
|
||||
|
||||
// EnvironmentOptionsDialog editor
|
||||
XMLConfig.SetDeleteValue(Path+'FormEditor/ShowBorderSpacing',
|
||||
|
@ -57,7 +57,7 @@ uses
|
||||
SrcEditorIntf, MenuIntf, LazIDEIntf, PackageIntf, IDEHelpIntf, IDEImagesIntf,
|
||||
IDEWindowIntf, ProjectIntf,
|
||||
// IDE units
|
||||
IDEDialogs, LazarusIDEStrConsts, IDECommands, EditorOptions,
|
||||
IDEDialogs, LazarusIDEStrConsts, IDECommands, EditorOptions, EnvironmentOpts,
|
||||
WordCompletion, FindReplaceDialog, IDEProcs, IDEOptionDefs,
|
||||
MacroPromptDlg, TransferMacros, CodeContextForm, SrcEditHintFrm, MsgView, InputHistory, CodeMacroPrompt,
|
||||
CodeTemplatesDlg, CodeToolsOptions,
|
||||
@ -108,6 +108,7 @@ type
|
||||
{ TSourceEditCompletion }
|
||||
|
||||
TSourceEditCompletion=class(TSynCompletion)
|
||||
procedure CompletionFormResized(Sender: TObject);
|
||||
private
|
||||
FIdentCompletionJumpToError: boolean;
|
||||
ccSelection: String;
|
||||
@ -1423,6 +1424,12 @@ end;
|
||||
|
||||
{ TSourceEditCompletion }
|
||||
|
||||
procedure TSourceEditCompletion.CompletionFormResized(Sender: TObject);
|
||||
begin
|
||||
EnvironmentOptions.CompletionWindowWidth := TheForm.Width;
|
||||
EnvironmentOptions.CompletionWindowHeight := TheForm.NbLinesInWindow;
|
||||
end;
|
||||
|
||||
procedure TSourceEditCompletion.ccExecute(Sender: TObject);
|
||||
// init completion form
|
||||
// called by OnExecute just before showing
|
||||
@ -1970,6 +1977,10 @@ begin
|
||||
OnUTF8KeyPress:=@OnSynCompletionUTF8KeyPress;
|
||||
OnPositionChanged:=@OnSynCompletionPositionChanged;
|
||||
ShortCut:=Menus.ShortCut(VK_UNKNOWN,[]);
|
||||
TheForm.ShowSizeDrag := True;
|
||||
TheForm.Width := EnvironmentOptions.CompletionWindowWidth;
|
||||
TheForm.NbLinesInWindow := EnvironmentOptions.CompletionWindowHeight;
|
||||
TheForm.OnDragResized := @CompletionFormResized;
|
||||
end;
|
||||
|
||||
{ TSourceEditorSharedValues }
|
||||
|
Loading…
Reference in New Issue
Block a user