minimap: clean up and use default synedit font name

This commit is contained in:
mattias 2024-09-29 12:39:15 +02:00
parent dd066409f4
commit d7bacb390f
4 changed files with 14 additions and 14 deletions

View File

@ -14,7 +14,8 @@ unit CtrlMiniMap;
interface interface
uses uses
Classes, SysUtils, Graphics, IDEOptEditorIntf, SrcEditorIntf, LazConfigStorage, pnlMiniMap; Classes, SysUtils, Graphics, IDEOptEditorIntf, SrcEditorIntf, LazConfigStorage, LazLogger,
pnlMiniMap;
const const
DefaultEnabled = True; DefaultEnabled = True;
@ -214,7 +215,7 @@ begin
aPanel.Width:=MapWidth; aPanel.Width:=MapWidth;
aPanel.ViewWindowColor:=ViewWindowColor; aPanel.ViewWindowColor:=ViewWindowColor;
aPanel.ViewWindowTextColor:=ViewWindowTextColor; aPanel.ViewWindowTextColor:=ViewWindowTextColor;
If aFull then if aFull then
aPanel.ViewFontSize:=InitialViewFontSize; aPanel.ViewFontSize:=InitialViewFontSize;
end; end;
@ -230,7 +231,6 @@ begin
Enabled:=True; Enabled:=True;
end; end;
destructor TMinimapController.Destroy; destructor TMinimapController.Destroy;
begin begin
if FNeedSave then if FNeedSave then

View File

@ -15,7 +15,7 @@ interface
uses uses
Classes, SysUtils, Forms, Controls, StdCtrls, ColorBox, Dialogs, SpinEx, Classes, SysUtils, Forms, Controls, StdCtrls, ColorBox, Dialogs, SpinEx,
IDEOptionsIntf, IDEOptEditorIntf, IDEUtils, IDEDialogs; IDEOptionsIntf, IDEOptEditorIntf;
type type

View File

@ -15,7 +15,7 @@ interface
uses uses
Classes, SysUtils, Controls, ExtCtrls, SynEdit, SrcEditorIntf, Graphics, lclType, Classes, SysUtils, Controls, ExtCtrls, SynEdit, SrcEditorIntf, Graphics, lclType,
SynEditMarkupSpecialLine, SynEditTypes, SynEditMiscClasses, SynEditMarkupBracket; SynEditMarkupSpecialLine, SynEditTypes, SynEditMiscClasses, SynEditMarkupBracket, LazLogger;
Const Const
DefaultViewFontSize = 3; DefaultViewFontSize = 3;
@ -45,15 +45,15 @@ Type
Protected Protected
// Event handlers // Event handlers
procedure HandleLineMarkup(Sender: TObject; Line: integer; var Special: boolean; Markup: TSynSelectedColor); virtual; procedure HandleLineMarkup(Sender: TObject; Line: integer; var Special: boolean; Markup: TSynSelectedColor); virtual;
procedure HandleStatusChange(Sender: TObject; Changes: TSynStatusChanges); virtual; procedure HandleStatusChange(Sender: TObject; {%H-}Changes: TSynStatusChanges); virtual;
Procedure HandleClick(aSender : TObject); virtual; Procedure HandleClick({%H-}aSender : TObject); virtual;
procedure HandleEditorDestroy(Sender: TObject); virtual; procedure HandleEditorDestroy(Sender: TObject); virtual;
Procedure SyncViewWindow; Procedure SyncViewWindow;
Property MiniSynEdit : TSynEdit Read FMiniSynEdit; Property MiniSynEdit : TSynEdit Read FMiniSynEdit;
Property SourceSynEdit : TCustomSynEdit Read FSourceSynEdit; Property SourceSynEdit : TCustomSynEdit Read FSourceSynEdit;
Public Public
constructor create(aOwner : TComponent); override; constructor Create(aOwner : TComponent); override;
destructor destroy; override; destructor Destroy; override;
Procedure Reconfigure; Procedure Reconfigure;
Property SourceEditor: TSourceEditorInterface Read FSourceEditor Write SetSourceEditor; Property SourceEditor: TSourceEditorInterface Read FSourceEditor Write SetSourceEditor;
Property ViewWindowColor : TColor Read FViewWindowColor Write SetViewWindowColor; Property ViewWindowColor : TColor Read FViewWindowColor Write SetViewWindowColor;
@ -186,7 +186,7 @@ begin
ParentColor:=False; ParentColor:=False;
ParentFont:=False; ParentFont:=False;
Font.Name := 'Courier New'; Font.Name := SynDefaultFontName;
Font.Pitch := fpFixed; Font.Pitch := fpFixed;
Font.Quality := fqNonAntialiased; Font.Quality := fqNonAntialiased;
Gutter.Visible := False; Gutter.Visible := False;
@ -247,7 +247,7 @@ begin
Unhook; Unhook;
end; end;
constructor TMiniMapControl.create(aOwner: TComponent); constructor TMiniMapControl.Create(aOwner: TComponent);
begin begin
Inherited; Inherited;
BevelInner:=bvNone; BevelInner:=bvNone;
@ -274,7 +274,7 @@ begin
FSourceEditor:=nil; FSourceEditor:=nil;
end; end;
destructor TMiniMapControl.destroy; destructor TMiniMapControl.Destroy;
begin begin
Unhook; Unhook;
inherited destroy; inherited destroy;

View File

@ -7,7 +7,7 @@ interface
uses uses
CtrlMiniMap, Forms; CtrlMiniMap, Forms;
procedure register; procedure Register;
implementation implementation
@ -16,7 +16,7 @@ uses fraMiniMapConfig, IDEOptionsIntf, IDEOptEditorIntf;
var var
MiniMapOptionsFrameID : integer = 2100; MiniMapOptionsFrameID : integer = 2100;
procedure register; procedure Register;
begin begin
MiniMapController:=TMinimapController.Create(Application); MiniMapController:=TMinimapController.Create(Application);