mirror of https://gitlab.com/basile.b/dexed.git
added completion menu size as persistent option
This commit is contained in:
parent
1e1f7bf238
commit
7e1118cc24
|
@ -50,6 +50,8 @@ type
|
||||||
fOptions2: TSynEditorOptions2;
|
fOptions2: TSynEditorOptions2;
|
||||||
fMouseOptions: TSynEditorMouseOptions;
|
fMouseOptions: TSynEditorMouseOptions;
|
||||||
fCompletionMenuCaseCare: boolean;
|
fCompletionMenuCaseCare: boolean;
|
||||||
|
fCompletionMenuWidth: integer;
|
||||||
|
fCompletionMenuHeight: integer;
|
||||||
//
|
//
|
||||||
procedure setFont(aValue: TFont);
|
procedure setFont(aValue: TFont);
|
||||||
procedure setSelCol(aValue: TSynSelectedColor);
|
procedure setSelCol(aValue: TSynSelectedColor);
|
||||||
|
@ -63,6 +65,8 @@ type
|
||||||
procedure setAutoDotDelay(aValue: Integer);
|
procedure setAutoDotDelay(aValue: Integer);
|
||||||
published
|
published
|
||||||
property completionMenuCaseCare: boolean read fCompletionMenuCaseCare write fCompletionMenuCaseCare;
|
property completionMenuCaseCare: boolean read fCompletionMenuCaseCare write fCompletionMenuCaseCare;
|
||||||
|
property completionMenuWidth: integer read fCompletionMenuWidth write fCompletionMenuWidth;
|
||||||
|
property completionMenuHeight: integer read fCompletionMenuHeight write fCompletionMenuHeight;
|
||||||
property autoDotDelay: integer read fAutoDotDelay write SetautoDotDelay;
|
property autoDotDelay: integer read fAutoDotDelay write SetautoDotDelay;
|
||||||
property hintDelay: Integer read fDDocDelay write setDDocDelay stored false; deprecated;
|
property hintDelay: Integer read fDDocDelay write setDDocDelay stored false; deprecated;
|
||||||
property ddocDelay: Integer read fDDocDelay write setDDocDelay;
|
property ddocDelay: Integer read fDDocDelay write setDDocDelay;
|
||||||
|
@ -172,6 +176,9 @@ begin
|
||||||
fBracketMatchColor.Foreground := clRed;
|
fBracketMatchColor.Foreground := clRed;
|
||||||
fBracketMatchColor.Background := clNone;
|
fBracketMatchColor.Background := clNone;
|
||||||
//
|
//
|
||||||
|
fCompletionMenuHeight:= 260;
|
||||||
|
fCompletionMenuWidth:= 160;
|
||||||
|
//
|
||||||
rightEdge := 80;
|
rightEdge := 80;
|
||||||
tabulationWidth := 4;
|
tabulationWidth := 4;
|
||||||
blockIdentation := 4;
|
blockIdentation := 4;
|
||||||
|
@ -222,6 +229,8 @@ begin
|
||||||
begin
|
begin
|
||||||
srcopt := TCEEditorOptionsBase(src);
|
srcopt := TCEEditorOptionsBase(src);
|
||||||
//
|
//
|
||||||
|
fCompletionMenuWidth:=srcopt.fCompletionMenuWidth;
|
||||||
|
fCompletionMenuHeight:=srcopt.fCompletionMenuHeight;
|
||||||
fCompletionMenuCaseCare:=srcopt.fCompletionMenuCaseCare;
|
fCompletionMenuCaseCare:=srcopt.fCompletionMenuCaseCare;
|
||||||
fAutoDotDelay:=srcopt.fAutoDotDelay;
|
fAutoDotDelay:=srcopt.fAutoDotDelay;
|
||||||
fDDocDelay:=srcopt.fDDocDelay;
|
fDDocDelay:=srcopt.fDDocDelay;
|
||||||
|
@ -347,6 +356,8 @@ end;
|
||||||
|
|
||||||
procedure TCEEditorOptions.docClosing(aDoc: TCESynMemo);
|
procedure TCEEditorOptions.docClosing(aDoc: TCESynMemo);
|
||||||
begin
|
begin
|
||||||
|
fCompletionMenuHeight:=aDoc.completionMenu.TheForm.Height;
|
||||||
|
fCompletionMenuWidth:=aDoc.completionMenu.TheForm.Width;
|
||||||
end;
|
end;
|
||||||
{$ENDREGION}
|
{$ENDREGION}
|
||||||
|
|
||||||
|
@ -468,11 +479,16 @@ begin
|
||||||
anEditor.D2Highlighter.Assign(D2Syn);
|
anEditor.D2Highlighter.Assign(D2Syn);
|
||||||
anEditor.TxtHighlighter.Assign(TxtSyn);
|
anEditor.TxtHighlighter.Assign(TxtSyn);
|
||||||
|
|
||||||
anEditor.completionMenuCaseCare:=fCompletionMenuCaseCare;
|
|
||||||
anEditor.autoDotDelay:=fAutoDotDelay;
|
anEditor.autoDotDelay:=fAutoDotDelay;
|
||||||
anEditor.ddocDelay:=fDDocDelay;
|
anEditor.ddocDelay:=fDDocDelay;
|
||||||
|
|
||||||
anEditor.defaultFontSize := font.Size;
|
anEditor.defaultFontSize := font.Size;
|
||||||
anEditor.Font.Assign(font);
|
anEditor.Font.Assign(font);
|
||||||
|
|
||||||
|
anEditor.completionMenu.TheForm.Height := fCompletionMenuHeight;
|
||||||
|
anEditor.completionMenu.TheForm.Width := fCompletionMenuWidth;
|
||||||
|
anEditor.completionMenu.CaseSensitive := fCompletionMenuCaseCare;
|
||||||
|
|
||||||
anEditor.SelectedColor.Assign(fSelCol);
|
anEditor.SelectedColor.Assign(fSelCol);
|
||||||
anEditor.FoldedCodeColor.Assign(fFoldedColor);
|
anEditor.FoldedCodeColor.Assign(fFoldedColor);
|
||||||
anEditor.MouseLinkColor.Assign(fMouseLinkColor);
|
anEditor.MouseLinkColor.Assign(fMouseLinkColor);
|
||||||
|
|
|
@ -108,7 +108,6 @@ type
|
||||||
fAutoDotTimer: TIdleTimer;
|
fAutoDotTimer: TIdleTimer;
|
||||||
fCanShowHint: boolean;
|
fCanShowHint: boolean;
|
||||||
fCanAutoDot: boolean;
|
fCanAutoDot: boolean;
|
||||||
fCompletionCaseSens: boolean;
|
|
||||||
fOldMousePos: TPoint;
|
fOldMousePos: TPoint;
|
||||||
fSyncEdit: TSynPluginSyncroEdit;
|
fSyncEdit: TSynPluginSyncroEdit;
|
||||||
fCompletion: TSynCompletion;
|
fCompletion: TSynCompletion;
|
||||||
|
@ -129,7 +128,6 @@ type
|
||||||
procedure AutoDotTimerEvent(sender: TObject);
|
procedure AutoDotTimerEvent(sender: TObject);
|
||||||
procedure InitHintWins;
|
procedure InitHintWins;
|
||||||
function getIfTemp: boolean;
|
function getIfTemp: boolean;
|
||||||
procedure SetcompletionMenuCaseCare(aValue: boolean);
|
|
||||||
procedure setDDocDelay(aValue: Integer);
|
procedure setDDocDelay(aValue: Integer);
|
||||||
procedure setAutoDotDelay(aValue: Integer);
|
procedure setAutoDotDelay(aValue: Integer);
|
||||||
procedure completionExecute(sender: TObject);
|
procedure completionExecute(sender: TObject);
|
||||||
|
@ -157,7 +155,6 @@ type
|
||||||
property defaultFontSize: Integer read fDefaultFontSize write setDefaultFontSize;
|
property defaultFontSize: Integer read fDefaultFontSize write setDefaultFontSize;
|
||||||
property ddocDelay: Integer read fDDocDelay write setDDocDelay;
|
property ddocDelay: Integer read fDDocDelay write setDDocDelay;
|
||||||
property autoDotDelay: Integer read fAutoDotDelay write setAutoDotDelay;
|
property autoDotDelay: Integer read fAutoDotDelay write setAutoDotDelay;
|
||||||
property completionMenuCaseCare: boolean read fCompletionCaseSens write SetcompletionMenuCaseCare;
|
|
||||||
public
|
public
|
||||||
constructor Create(aOwner: TComponent); override;
|
constructor Create(aOwner: TComponent); override;
|
||||||
destructor destroy; override;
|
destructor destroy; override;
|
||||||
|
@ -183,6 +180,7 @@ type
|
||||||
property modified: boolean read fModified;
|
property modified: boolean read fModified;
|
||||||
property tempFilename: string read fTempFileName;
|
property tempFilename: string read fTempFileName;
|
||||||
//
|
//
|
||||||
|
property completionMenu: TSynCompletion read fCompletion;
|
||||||
property syncroEdit: TSynPluginSyncroEdit read fSyncEdit;
|
property syncroEdit: TSynPluginSyncroEdit read fSyncEdit;
|
||||||
property isDSource: boolean read fIsDSource;
|
property isDSource: boolean read fIsDSource;
|
||||||
property isProjectFile: boolean read fIsConfig; // warning: never set !
|
property isProjectFile: boolean read fIsConfig; // warning: never set !
|
||||||
|
@ -451,7 +449,6 @@ begin
|
||||||
fSyncEdit.CaseSensitive := true;
|
fSyncEdit.CaseSensitive := true;
|
||||||
AssignPng(fSyncEdit.GutterGlyph, 'link_edit');
|
AssignPng(fSyncEdit.GutterGlyph, 'link_edit');
|
||||||
//
|
//
|
||||||
fCompletionCaseSens:=false;
|
|
||||||
fCompletion := TSyncompletion.create(nil);
|
fCompletion := TSyncompletion.create(nil);
|
||||||
fCompletion.ShowSizeDrag := true;
|
fCompletion.ShowSizeDrag := true;
|
||||||
fCompletion.Editor := Self;
|
fCompletion.Editor := Self;
|
||||||
|
@ -610,12 +607,6 @@ begin
|
||||||
fDDocTimer.Interval:=fDDocDelay;
|
fDDocTimer.Interval:=fDDocDelay;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCESynMemo.SetcompletionMenuCaseCare(aValue: boolean);
|
|
||||||
begin
|
|
||||||
fCompletionCaseSens:=aValue;
|
|
||||||
fCompletion.CaseSensitive:=aValue;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TCESynMemo.DDocTimerEvent(sender: TObject);
|
procedure TCESynMemo.DDocTimerEvent(sender: TObject);
|
||||||
begin
|
begin
|
||||||
if not Visible then exit;
|
if not Visible then exit;
|
||||||
|
|
Loading…
Reference in New Issue