1
0
mirror of https://github.com/winscp/winscp.git synced 2026-10-24 02:28:55 +03:00

Temporary reverting font to Tahoma:8 (from default BCB 11's Segoe UI:9) to match the windows layout

Source commit: 815a497dffe349865a283f50ec0cd4af92cb3489
This commit is contained in:
Martin Prikryl
2024-10-08 11:32:13 +00:00
parent 79dd86a15f
commit e55f27dab3
42 changed files with 208 additions and 46 deletions

View File

@@ -62,6 +62,8 @@ WINAPI wWinMain(HINSTANCE, HINSTANCE, LPWSTR, int)
Application->Initialize();
Application->MainFormOnTaskBar = true;
Application->ModalPopupMode = pmAuto;
Application->DefaultFont->Name = L"Tahoma";
Application->DefaultFont->Height = -11;
SetEnvironmentVariable(L"WINSCP_PATH",
ExcludeTrailingBackslash(ExtractFilePath(Application->ExeName)).c_str());
CoreInitialize();

View File

@@ -9,7 +9,11 @@ object AboutDialog: TAboutDialog
ClientHeight = 501
ClientWidth = 410
Color = clBtnFace
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
KeyPreview = True
Position = poOwnerFormCenter
OnKeyDown = FormKeyDown

View File

@@ -11,7 +11,11 @@ object AuthenticateForm: TAuthenticateForm
Color = clBtnFace
Constraints.MinHeight = 200
Constraints.MinWidth = 280
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
Position = poOwnerFormCenter
OnResize = FormResize
OnShow = FormShow

View File

@@ -9,7 +9,11 @@ object CleanupDialog: TCleanupDialog
ClientHeight = 299
ClientWidth = 489
Color = clBtnFace
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
Position = poOwnerFormCenter
OnShow = FormShow
DesignSize = (

View File

@@ -10,7 +10,11 @@ object ConsoleDialog: TConsoleDialog
Color = clBtnFace
Constraints.MinHeight = 250
Constraints.MinWidth = 420
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
Icon.Data = {
000001000700404000000100200028420000760000003030000001002000A825
00009E4200002828000001002000681A0000466800002020000001002000A810

View File

@@ -9,7 +9,11 @@ object CopyDialog: TCopyDialog
ClientHeight = 225
ClientWidth = 511
Color = clBtnFace
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
Position = poOwnerFormCenter
OnCloseQuery = FormCloseQuery
OnShow = FormShow

View File

@@ -9,7 +9,11 @@ object CopyLocalDialog: TCopyLocalDialog
ClientHeight = 121
ClientWidth = 511
Color = clBtnFace
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
Position = poOwnerFormCenter
OnCloseQuery = FormCloseQuery
OnShow = FormShow

View File

@@ -9,7 +9,11 @@ object CopyParamCustomDialog: TCopyParamCustomDialog
ClientHeight = 515
ClientWidth = 420
Color = clBtnFace
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
Position = poOwnerFormCenter
OnCloseQuery = FormCloseQuery
DesignSize = (

View File

@@ -9,7 +9,11 @@ object CopyParamPresetDialog: TCopyParamPresetDialog
ClientHeight = 560
ClientWidth = 675
Color = clBtnFace
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
Position = poOwnerFormCenter
OnCloseQuery = FormCloseQuery
OnShow = FormShow

View File

@@ -4,6 +4,12 @@ object CopyParamsFrame: TCopyParamsFrame
Width = 420
Height = 477
HelpType = htKeyword
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
TabOrder = 0
object CommonPropertiesGroup: TGroupBox
Left = 212

View File

@@ -9,7 +9,11 @@ object CreateDirectoryDialog: TCreateDirectoryDialog
ClientHeight = 253
ClientWidth = 337
Color = clBtnFace
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
Position = poOwnerFormCenter
OnCloseQuery = FormCloseQuery
OnShow = FormShow

View File

@@ -7,7 +7,11 @@ object CustomDialog: TCustomDialog
ClientHeight = 41
ClientWidth = 326
Color = clBtnFace
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
Position = poOwnerFormCenter
DesignSize = (
326

View File

@@ -9,7 +9,11 @@ object CustomCommandDialog: TCustomCommandDialog
ClientHeight = 309
ClientWidth = 416
Color = clBtnFace
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
Position = poOwnerFormCenter
OnCloseQuery = FormCloseQuery
OnShow = FormShow

View File

@@ -5,7 +5,11 @@ object CustomScpExplorerForm: TCustomScpExplorerForm
ClientHeight = 432
ClientWidth = 620
Color = clBtnFace
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
KeyPreview = True
OnClose = FormClose
OnCloseQuery = FormCloseQuery

View File

@@ -9,7 +9,11 @@ object EditMaskDialog: TEditMaskDialog
ClientHeight = 500
ClientWidth = 425
Color = clBtnFace
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
KeyPreview = True
Position = poOwnerFormCenter
OnCloseQuery = FormCloseQuery

View File

@@ -8,7 +8,11 @@ object EditorForm: TEditorForm
ClientHeight = 381
ClientWidth = 609
Color = clBtnFace
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
Icon.Data = {
000001000700404000000100200028420000760000003030000001002000A825
00009E4200002828000001002000681A0000466800002020000001002000A810

View File

@@ -9,7 +9,11 @@ object EditorPreferencesDialog: TEditorPreferencesDialog
ClientHeight = 389
ClientWidth = 403
Color = clBtnFace
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
Position = poOwnerFormCenter
OnCloseQuery = FormCloseQuery
OnShow = FormShow

View File

@@ -10,7 +10,11 @@ object FileFindDialog: TFileFindDialog
Color = clBtnFace
Constraints.MinHeight = 240
Constraints.MinWidth = 400
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
Icon.Data = {
000001000700404000000100200028420000760000003030000001002000A825
00009E4200002828000001002000681A0000466800002020000001002000A810

View File

@@ -9,7 +9,11 @@ object FileSystemInfoDialog: TFileSystemInfoDialog
ClientHeight = 398
ClientWidth = 371
Color = clBtnFace
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
Position = poOwnerFormCenter
OnShow = FormShow
DesignSize = (

View File

@@ -9,7 +9,11 @@ object FullSynchronizeDialog: TFullSynchronizeDialog
ClientHeight = 477
ClientWidth = 481
Color = clBtnFace
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
Position = poOwnerFormCenter
OnCloseQuery = FormCloseQuery
OnShow = FormShow

View File

@@ -11,7 +11,11 @@ object GenerateUrlDialog: TGenerateUrlDialog
Color = clBtnFace
Constraints.MinHeight = 300
Constraints.MinWidth = 484
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
Position = poOwnerFormCenter
OnShow = FormShow
DesignSize = (

View File

@@ -9,7 +9,11 @@ object ImportSessionsDialog: TImportSessionsDialog
ClientHeight = 273
ClientWidth = 375
Color = clBtnFace
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
Position = poOwnerFormCenter
OnShow = FormShow
DesignSize = (

View File

@@ -8,7 +8,11 @@ object LicenseDialog: TLicenseDialog
ClientHeight = 320
ClientWidth = 504
Color = clBtnFace
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
Position = poOwnerFormCenter
DesignSize = (
504

View File

@@ -9,7 +9,11 @@ object LocationProfilesDialog: TLocationProfilesDialog
ClientHeight = 435
ClientWidth = 557
Color = clBtnFace
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
Position = poOwnerFormCenter
OnShow = FormShow
DesignSize = (

View File

@@ -10,7 +10,11 @@ object LoginDialog: TLoginDialog
Color = clBtnFace
Constraints.MinHeight = 399
Constraints.MinWidth = 600
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
KeyPreview = True
Position = poOwnerFormCenter
OnCloseQuery = FormCloseQuery

View File

@@ -21,6 +21,7 @@
#include <Setup.h>
#include <WinApi.h>
#include "MessageDlg.h"
#include <Custom.h>
//---------------------------------------------------------------------------
#pragma resource "*.dfm"
//---------------------------------------------------------------------------
@@ -78,7 +79,8 @@ __fastcall TMessageForm::TMessageForm(TComponent * AOwner) : TForm(AOwner)
NeverAskAgainCheck = NULL;
FUpdateForShiftStateTimer = NULL;
UseSystemSettingsPre(this);
FDummyForm = new TForm(this);
// DFM-based form, to use the custom Tahoma font
FDummyForm = new TCustomDialog(EmptyStr);
UseSystemSettings(FDummyForm);
}
//---------------------------------------------------------------------------

View File

@@ -7,7 +7,11 @@ object MessageForm: TMessageForm
ClientHeight = 41
ClientWidth = 326
Color = clBtnFace
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
Position = poOwnerFormCenter
TextHeight = 13
end

View File

@@ -9,7 +9,11 @@ object OpenDirectoryDialog: TOpenDirectoryDialog
ClientHeight = 334
ClientWidth = 405
Color = clBtnFace
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
Position = poOwnerFormCenter
OnShow = FormShow
DesignSize = (

View File

@@ -9,7 +9,11 @@ object PreferencesDialog: TPreferencesDialog
ClientHeight = 519
ClientWidth = 545
Color = clBtnFace
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
Position = poOwnerFormCenter
OnCloseQuery = FormCloseQuery
OnShortCut = FormShortCut

View File

@@ -9,7 +9,11 @@ object ProgressForm: TProgressForm
ClientHeight = 291
ClientWidth = 360
Color = clWindow
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
PopupMode = pmAuto
Position = poOwnerFormCenter
OnHide = FormHide

View File

@@ -9,7 +9,11 @@ object PropertiesDialog: TPropertiesDialog
ClientHeight = 416
ClientWidth = 357
Color = clBtnFace
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
Position = poOwnerFormCenter
OnCloseQuery = FormCloseQuery
OnShow = FormShow

View File

@@ -9,7 +9,11 @@ object RemoteTransferDialog: TRemoteTransferDialog
ClientHeight = 179
ClientWidth = 420
Color = clBtnFace
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
Position = poOwnerFormCenter
OnCloseQuery = FormCloseQuery
OnShow = FormShow

View File

@@ -3,6 +3,12 @@ object RightsFrame: TRightsFrame
Top = 0
Width = 239
Height = 109
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
ParentFont = False
TabOrder = 0
OnContextPopup = FrameContextPopup
object OthersButton: TSpeedButton

View File

@@ -9,7 +9,11 @@ object SelectMaskDialog: TSelectMaskDialog
ClientHeight = 186
ClientWidth = 417
Color = clBtnFace
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
Position = poDesigned
OnCloseQuery = FormCloseQuery
OnShow = FormShow

View File

@@ -9,7 +9,11 @@ object SiteAdvancedDialog: TSiteAdvancedDialog
ClientHeight = 432
ClientWidth = 561
Color = clBtnFace
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
Position = poOwnerFormCenter
OnClose = FormClose
OnCloseQuery = FormCloseQuery

View File

@@ -9,7 +9,11 @@ object SymlinkDialog: TSymlinkDialog
ClientHeight = 183
ClientWidth = 396
Color = clBtnFace
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
Position = poOwnerFormCenter
OnShow = FormShow
DesignSize = (

View File

@@ -9,7 +9,11 @@ object SynchronizeDialog: TSynchronizeDialog
ClientHeight = 445
ClientWidth = 468
Color = clBtnFace
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
KeyPreview = True
Position = poOwnerFormCenter
OnCloseQuery = FormCloseQuery

View File

@@ -8,7 +8,11 @@ object SynchronizeChecklistDialog: TSynchronizeChecklistDialog
ClientHeight = 521
ClientWidth = 695
Color = clBtnFace
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
Icon.Data = {
000001000700404000000100200028420000760000003030000001002000A825
00009E4200002828000001002000681A0000466800002020000001002000A810

View File

@@ -7,7 +7,11 @@ object SynchronizeProgressForm: TSynchronizeProgressForm
ClientHeight = 219
ClientWidth = 424
Color = clWindow
ParentFont = True
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
Position = poOwnerFormCenter
DesignSize = (
424

View File

@@ -115,7 +115,7 @@ void __fastcall FlashOnBackground()
}
}
//---------------------------------------------------------------------------
void __fastcall LocalSystemSettings(TCustomForm * /*Control*/)
void __fastcall LocalSystemSettings(TForm * /*Control*/)
{
// noop
}

View File

@@ -1163,7 +1163,7 @@ void __fastcall ApplySystemSettingsOnControl(TControl * Control)
}
//---------------------------------------------------------------------------
// Settings that must be set as soon as possible.
void __fastcall UseSystemSettingsPre(TCustomForm * Control)
void __fastcall UseSystemSettingsPre(TForm * Control)
{
LocalSystemSettings(Control);
@@ -1178,6 +1178,12 @@ void __fastcall UseSystemSettingsPre(TCustomForm * Control)
Control->HelpKeyword = L"start";
}
// We have legacy XE6 font (Tahoma) explicitly set in DFMs to match the layout.
// That unlinks the font fonts from the Application->DefaultFont. We set the DefaultFont to Tahoma in WinSCP.cpp.
// So we can link the form's font back to it now.
DebugAssert(SameFont(Control->Font, Application->DefaultFont));
Control->ParentFont = true;
ApplySystemSettingsOnControl(Control);
};
//---------------------------------------------------------------------------
@@ -1211,7 +1217,7 @@ static void FlipAnchors(TControl * Control)
}
//---------------------------------------------------------------------------
// Settings that must be set only after whole form is constructed
void __fastcall UseSystemSettingsPost(TCustomForm * Control)
void __fastcall UseSystemSettingsPost(TForm * Control)
{
// When showing an early error message
if (WinConfiguration != NULL)
@@ -1229,13 +1235,13 @@ void __fastcall UseSystemSettingsPost(TCustomForm * Control)
ResetSystemSettings(Control);
};
//---------------------------------------------------------------------------
void __fastcall UseSystemSettings(TCustomForm * Control)
void __fastcall UseSystemSettings(TForm * Control)
{
UseSystemSettingsPre(Control);
UseSystemSettingsPost(Control);
};
//---------------------------------------------------------------------------
void __fastcall ResetSystemSettings(TCustomForm * /*Control*/)
void __fastcall ResetSystemSettings(TForm * /*Control*/)
{
// noop
}

View File

@@ -20,11 +20,11 @@ int CalculateCheckBoxWidth(TControl * Control, const UnicodeString & Caption);
void AutoSizeCheckBox(TCheckBox * CheckBox);
void __fastcall InitializeSystemSettings();
void __fastcall FinalizeSystemSettings();
void __fastcall LocalSystemSettings(TCustomForm * Control);
void __fastcall UseSystemSettingsPre(TCustomForm * Control);
void __fastcall UseSystemSettingsPost(TCustomForm * Control);
void __fastcall UseSystemSettings(TCustomForm * Control);
void __fastcall ResetSystemSettings(TCustomForm * Control);
void __fastcall LocalSystemSettings(TForm * Control);
void __fastcall UseSystemSettingsPre(TForm * Control);
void __fastcall UseSystemSettingsPost(TForm * Control);
void __fastcall UseSystemSettings(TForm * Control);
void __fastcall ResetSystemSettings(TForm * Control);
void __fastcall LinkLabel(TStaticText * StaticText, UnicodeString Url = L"",
TNotifyEvent OnEnter = NULL);
void __fastcall LinkActionLabel(TStaticText * StaticText);