Skip to content

Commit

Permalink
Fix #1209
Browse files Browse the repository at this point in the history
  • Loading branch information
pyscripter committed Jun 4, 2023
1 parent b6ea48e commit 37c32ab
Show file tree
Hide file tree
Showing 6 changed files with 541 additions and 825 deletions.
1,340 changes: 521 additions & 819 deletions Help/Source/ideoptions.htm

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions Source/cPyScripterSettings.pas
Expand Up @@ -142,6 +142,7 @@ TPythonIDEOptions = class(TBaseOptions, IFreeNotification)
fSpellCheckAsYouType: Boolean;
fAutoRestart: Boolean;
fLoggingEnabled: Boolean;
fUIContentFontSize: Integer;
fTrackChanges: TSynTrackChanges;
fSelectionColor: TSynSelectedColor;
fIndentGuides: TSynIndentGuides;
Expand Down Expand Up @@ -331,6 +332,7 @@ TPythonIDEOptions = class(TBaseOptions, IFreeNotification)
write fSpellCheckAsYouType default False;
property AutoRestart: Boolean read fAutoRestart write fAutoRestart default True;
property LoggingEnabled: Boolean read fLoggingEnabled write fLoggingEnabled default False;
property UIContentFontSize: Integer read fUIContentFontSize write fUIContentFontSize default 9;
end;
{$METHODINFO OFF}

Expand Down Expand Up @@ -546,6 +548,7 @@ procedure TPythonIDEOptions.Assign(Source: TPersistent);
Self.fSpellCheckAsYouType := SpellCheckAsYouType;
Self.fAutoRestart := AutoRestart;
Self.fLoggingEnabled := LoggingEnabled;
Self.fUIContentFontSize := UIContentFontSize;
end
else
inherited;
Expand Down Expand Up @@ -647,6 +650,7 @@ constructor TPythonIDEOptions.Create;
fSpellCheckAsYouType := False;
fAutoRestart := True;
fLoggingEnabled := False;
fUIContentFontSize := 9;
fCodeFolding := TSynCodeFolding.Create;
fCodeFolding.GutterShapeSize := 9; // default value
fTrackChanges := TSynTrackChanges.Create(nil);
Expand Down
10 changes: 6 additions & 4 deletions Source/dlgPyIDEBase.dfm
Expand Up @@ -5,10 +5,12 @@ object PyIDEDlgBase: TPyIDEDlgBase
ClientHeight = 249
ClientWidth = 428
Color = clBtnFace
ParentFont = True
OldCreateOrder = False
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -12
Font.Name = 'Segoe UI'
Font.Style = []
Position = poMainFormCenter
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 13
TextHeight = 15
end
5 changes: 4 additions & 1 deletion Source/dlgPyIDEBase.pas
Expand Up @@ -20,13 +20,16 @@ TPyIDEDlgBase = class(TForm)

implementation

uses JvGnugettext;
uses
uCommonFunctions,
JvGnugettext;

{$R *.dfm}

procedure TPyIDEDlgBase.FormCreate(Sender: TObject);
begin
TranslateComponent(Self);
SetDefaultUIFont(Font);
end;

end.
4 changes: 3 additions & 1 deletion Source/dmCommands.pas
Expand Up @@ -1573,7 +1573,7 @@ procedure TCommandsDataModule.actIDEOptionsExecute(Sender: TObject);
SetLength(Categories, 12);
with Categories[0] do begin
DisplayName := _('IDE');
SetLength(Options, 14);
SetLength(Options, 15);
Options[0].PropertyName := 'AutoCheckForUpdates';
Options[0].DisplayName := _('Check for updates automatically');
Options[1].PropertyName := 'DaysBetweenChecks';
Expand Down Expand Up @@ -1602,6 +1602,8 @@ procedure TCommandsDataModule.actIDEOptionsExecute(Sender: TObject);
Options[12].DisplayName := _('Automatic restart');
Options[13].PropertyName := 'LoggingEnabled';
Options[13].DisplayName := _('Logging enabled');
Options[14].PropertyName := 'UIContentFontSize';
Options[14].DisplayName := _('User Interface content font size in points');
end;
with Categories[1] do begin
DisplayName := _('Python Interpreter');
Expand Down
3 changes: 3 additions & 0 deletions Source/frmPyIDEMain.pas
Expand Up @@ -562,6 +562,7 @@
History: v 4.2.6
New Features
- Customizable user interface content font size (#1209)
Issues addressed
#1172, #1195, #1197, #1198, #1208
Expand Down Expand Up @@ -3063,6 +3064,8 @@ procedure TPyIDEMainForm.actFileCloseAllExecute(Sender: TObject);

procedure TPyIDEMainForm.PyIDEOptionsChanged;
begin
Application.DefaultFont.Size := PyIDEOptions.UIContentFontSize;

if PyIDEOptions.StyleMainWindowBorder then
Self.StyleElements := Self.StyleElements + [seBorder]
else
Expand Down

0 comments on commit 37c32ab

Please sign in to comment.