mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-05 10:55:56 +02:00
ide: use editor font in the path editor
git-svn-id: trunk@20343 -
This commit is contained in:
parent
41f819d8ed
commit
8ed9eb8aba
@ -676,7 +676,6 @@ type
|
||||
FUseCodeFolding: Boolean;
|
||||
FExpandedClickConf,
|
||||
FCollapsedClickConf: TSynGutterFoldClickConfList;
|
||||
|
||||
public
|
||||
constructor Create;
|
||||
destructor Destroy; override;
|
||||
@ -694,6 +693,7 @@ type
|
||||
procedure SetSynEditSettings(ASynEdit: TSynEdit); // write synedit settings to file
|
||||
procedure GetSynEditPreviewSettings(APreviewEditor: TObject);
|
||||
procedure AddSpecialHilightAttribsToHighlighter(Syn: TSrcIDEHighlighter);
|
||||
procedure ApplyFontSettingsTo(ASynEdit: TSynEdit);
|
||||
|
||||
function CreateSyn(LazSynHilighter: TLazSyntaxHighlighter): TSrcIDEHighlighter;
|
||||
function ReadColorScheme(const LanguageName: String): String;
|
||||
@ -2917,6 +2917,16 @@ begin
|
||||
aMarkup.StyleMask := DEFAULT_COLOR_SCHEME.Additional[AddHilightAttr].StylesMask;
|
||||
end;
|
||||
|
||||
procedure TEditorOptions.ApplyFontSettingsTo(ASynEdit: TSynEdit);
|
||||
begin
|
||||
ASynEdit.Font.Height := fEditorFontHeight;// set height before name for XLFD !
|
||||
ASynEdit.Font.Name := fEditorFont;
|
||||
if fDisableAntialiasing then
|
||||
ASynEdit.Font.Quality := fqNonAntialiased
|
||||
else
|
||||
ASynEdit.Font.Quality := fqDefault;
|
||||
end;
|
||||
|
||||
procedure TEditorOptions.GetSynEditSettings(ASynEdit: TSynEdit);
|
||||
// read synedit settings from config file
|
||||
var
|
||||
@ -2961,12 +2971,8 @@ begin
|
||||
else
|
||||
ASynEdit.RightEdge := 0;
|
||||
ASynEdit.RightEdgeColor := fRightMarginColor;
|
||||
ASynEdit.Font.Height := fEditorFontHeight;// set height before name for XLFD !
|
||||
ASynEdit.Font.Name := fEditorFont;
|
||||
if fDisableAntialiasing then
|
||||
ASynEdit.Font.Quality := fqNonAntialiased
|
||||
else
|
||||
ASynEdit.Font.Quality := fqDefault;
|
||||
|
||||
ApplyFontSettingsTo(ASynEdit);
|
||||
//debugln(['TEditorOptions.GetSynEditSettings ',ASynEdit.font.height]);
|
||||
|
||||
ASynEdit.ExtraCharSpacing := fExtraCharSpacing;
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
*****************************************************************************
|
||||
* *
|
||||
* See the file COPYING.modifiedLGPL.txt, included in this distribution, *
|
||||
* See the file COPYING.modifiedLGPL.txt, included in this distribution, *
|
||||
* for details about the copyright. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
@ -29,7 +29,7 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Forms, Controls, SynEdit, Buttons, StdCtrls, Dialogs,
|
||||
LResources, FileUtil, ButtonPanel, LazarusIDEStrConsts;
|
||||
LResources, FileUtil, ButtonPanel, LazarusIDEStrConsts, EditorOptions;
|
||||
|
||||
type
|
||||
|
||||
@ -157,10 +157,11 @@ begin
|
||||
DeleteButton.LoadGlyphFromLazarusResource('laz_delete');
|
||||
|
||||
PathEdit.Font.BeginUpdate;
|
||||
PathEdit.Font.Name:=SynDefaultFontName;
|
||||
PathEdit.Font.Height:=SynDefaultFontHeight;
|
||||
PathEdit.Font.Pitch:=SynDefaultFontPitch;
|
||||
PathEdit.Font.Pitch := SynDefaultFontPitch;
|
||||
EditorOpts.ApplyFontSettingsTo(PathEdit);
|
||||
PathEdit.Font.EndUpdate;
|
||||
PathEdit.ExtraCharSpacing := EditorOpts.ExtraCharSpacing;
|
||||
PathEdit.ExtraLineSpacing := EditorOpts.ExtraLineSpacing;
|
||||
end;
|
||||
|
||||
procedure TPathEditorDialog.FormResize(Sender: TObject);
|
||||
|
Loading…
Reference in New Issue
Block a user