editor, added option to ignore zooom and always apply fontsize, close #12

This commit is contained in:
Basile Burg 2016-02-07 18:58:17 +01:00
parent 24f6f23630
commit b6ff4fb441
2 changed files with 6 additions and 2 deletions

View File

@ -39,6 +39,7 @@ type
fIdentifierMarkup: TSynSelectedColor; fIdentifierMarkup: TSynSelectedColor;
fFont: TFont; fFont: TFont;
// //
fResetFontSize: boolean;
fIdentiMatchOpts: TIdentifierMatchOptions; fIdentiMatchOpts: TIdentifierMatchOptions;
fLineNumEvery: Integer; fLineNumEvery: Integer;
fDDocDelay: Integer; fDDocDelay: Integer;
@ -96,6 +97,7 @@ type
property mouseOptions: TSynEditorMouseOptions read fMouseOptions write fMouseOptions; property mouseOptions: TSynEditorMouseOptions read fMouseOptions write fMouseOptions;
property options1: TSynEditorOptions read fOptions1 write fOptions1; property options1: TSynEditorOptions read fOptions1 write fOptions1;
property options2: TSynEditorOptions2 read fOptions2 write fOptions2; property options2: TSynEditorOptions2 read fOptions2 write fOptions2;
property resetFontSize: boolean read fResetFontSize write fResetFontSize default false;
property rightEdge: Integer read fRightEdge write fRightEdge default 80; property rightEdge: Integer read fRightEdge write fRightEdge default 80;
property rightEdgeColor: TColor read fRightEdgeColor write fRightEdgeColor default clSilver; property rightEdgeColor: TColor read fRightEdgeColor write fRightEdgeColor default clSilver;
property selection: TSynSelectedColor read fSelAttribs write setSelCol; property selection: TSynSelectedColor read fSelAttribs write setSelCol;
@ -259,6 +261,7 @@ begin
begin begin
srcopt := TCEEditorOptionsBase(src); srcopt := TCEEditorOptionsBase(src);
// //
fResetFontSize:=srcopt.fResetFontSize;
fAutoCLoseCurlyBrace := srcopt.fAutoCLoseCurlyBrace; fAutoCLoseCurlyBrace := srcopt.fAutoCLoseCurlyBrace;
fCompletionMenuWidth:=srcopt.fCompletionMenuWidth; fCompletionMenuWidth:=srcopt.fCompletionMenuWidth;
fCompletionMenuLines:=srcopt.fCompletionMenuLines; fCompletionMenuLines:=srcopt.fCompletionMenuLines;
@ -600,7 +603,8 @@ begin
savedSize := anEditor.Font.Size; savedSize := anEditor.Font.Size;
anEditor.defaultFontSize := font.Size; anEditor.defaultFontSize := font.Size;
anEditor.Font.Assign(font); anEditor.Font.Assign(font);
anEditor.Font.Size := savedSize; if not fResetFontSize then
anEditor.Font.Size := savedSize;
anEditor.autoCloseCurlyBrace := fAutoCLoseCurlyBrace; anEditor.autoCloseCurlyBrace := fAutoCLoseCurlyBrace;
anEditor.completionMenu.TheForm.Width := fCompletionMenuWidth; anEditor.completionMenu.TheForm.Width := fCompletionMenuWidth;

View File

@ -29,7 +29,7 @@
[lnk_cetodo]: https://github.com/BBasile/Coedit/tree/master/cetodo [lnk_cetodo]: https://github.com/BBasile/Coedit/tree/master/cetodo
[lnk_cesyms]: https://github.com/BBasile/Coedit/tree/master/cesyms [lnk_cesyms]: https://github.com/BBasile/Coedit/tree/master/cesyms
[lnk_bugtracker]: https://github.com/BBasile/Coedit/issue [lnk_bugtracker]: https://github.com/BBasile/Coedit/issues
Welcome to Coedit Wiki, the documentation source for the small Windows & Linux IDE for the D programming language. Welcome to Coedit Wiki, the documentation source for the small Windows & Linux IDE for the D programming language.
A summary of the content is accessible in the right side-bar. A summary of the content is accessible in the right side-bar.