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 MessageDialog(const Title, Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons): Integer; overload;
|
||||||
function ErrorDialog(Msg: string): Integer; overload;
|
function ErrorDialog(Msg: string): Integer; overload;
|
||||||
function ErrorDialog(const Title, Msg: string): Integer; overload;
|
function ErrorDialog(const Title, Msg: string): Integer; overload;
|
||||||
procedure SetVistaFonts(const AFont: TFont);
|
|
||||||
|
|
||||||
var
|
var
|
||||||
MainReg: TRegistry;
|
MainReg: TRegistry;
|
||||||
@ -2653,20 +2652,6 @@ begin
|
|||||||
end;
|
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 }
|
{ Threading stuff }
|
||||||
|
|
||||||
|
@ -1275,6 +1275,8 @@ end;
|
|||||||
to complete and can be annoying.
|
to complete and can be annoying.
|
||||||
}
|
}
|
||||||
procedure TMainForm.FormCreate(Sender: TObject);
|
procedure TMainForm.FormCreate(Sender: TObject);
|
||||||
|
const
|
||||||
|
VistaFont = 'Segoe UI';
|
||||||
var
|
var
|
||||||
i, j, MonitorIndex: Integer;
|
i, j, MonitorIndex: Integer;
|
||||||
datafontname: String;
|
datafontname: String;
|
||||||
@ -1384,8 +1386,10 @@ begin
|
|||||||
Delimiter := GetRegValue(REGNAME_DELIMITER, DEFAULT_DELIMITER);
|
Delimiter := GetRegValue(REGNAME_DELIMITER, DEFAULT_DELIMITER);
|
||||||
|
|
||||||
// Delphi work around to force usage of Vista's default font (other OSes will be unaffected)
|
// Delphi work around to force usage of Vista's default font (other OSes will be unaffected)
|
||||||
SetVistaFonts(Font);
|
if (Win32MajorVersion >= 6) and (Screen.Fonts.IndexOf(VistaFont) >= 0) then begin
|
||||||
InheritFont(Font);
|
Font.Size := Font.Size + 1;
|
||||||
|
Font.Name := VistaFont;
|
||||||
|
end;
|
||||||
InheritFont(SynCompletionProposal.Font);
|
InheritFont(SynCompletionProposal.Font);
|
||||||
InheritFont(ParameterCompletionProposal.Font);
|
InheritFont(ParameterCompletionProposal.Font);
|
||||||
// Simulated link label, has non inherited blue font color
|
// Simulated link label, has non inherited blue font color
|
||||||
|
Reference in New Issue
Block a user