diff --git a/source/helpers.pas b/source/helpers.pas index 98a79cb9..48b1d1d7 100644 --- a/source/helpers.pas +++ b/source/helpers.pas @@ -197,7 +197,6 @@ type function MessageDialog(const Title, Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons): Integer; overload; function ErrorDialog(Msg: string): Integer; overload; function ErrorDialog(const Title, Msg: string): Integer; overload; - procedure SetVistaFonts(const AFont: TFont); var MainReg: TRegistry; @@ -2653,20 +2652,6 @@ begin end; -procedure SetVistaFonts(const AFont: TFont); -const - VistaFont = 'Segoe UI'; -begin - if (Win32MajorVersion >= 6) - and not SameText(AFont.Name, VistaFont) - and (Screen.Fonts.IndexOf(VistaFont) >= 0) then - begin - AFont.Size := AFont.Size + 1; - AFont.Name := VistaFont; - end; -end; - - { Threading stuff } diff --git a/source/main.pas b/source/main.pas index 3fd857e0..3c5880ce 100644 --- a/source/main.pas +++ b/source/main.pas @@ -1275,6 +1275,8 @@ end; to complete and can be annoying. } procedure TMainForm.FormCreate(Sender: TObject); +const + VistaFont = 'Segoe UI'; var i, j, MonitorIndex: Integer; datafontname: String; @@ -1384,8 +1386,10 @@ begin Delimiter := GetRegValue(REGNAME_DELIMITER, DEFAULT_DELIMITER); // Delphi work around to force usage of Vista's default font (other OSes will be unaffected) - SetVistaFonts(Font); - InheritFont(Font); + if (Win32MajorVersion >= 6) and (Screen.Fonts.IndexOf(VistaFont) >= 0) then begin + Font.Size := Font.Size + 1; + Font.Name := VistaFont; + end; InheritFont(SynCompletionProposal.Font); InheritFont(ParameterCompletionProposal.Font); // Simulated link label, has non inherited blue font color