mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Remove SetVistaFont(), move code to the only caller of it in TMainForm.FormCreate.
This commit is contained in:
@ -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 }
|
||||
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user