зеркало из https://github.com/mozilla/pjs.git
Bug 291143 The heading text is rendered normal font (and the font should be set from install.it) r=bsmedberg, sr=dveditz, a=asa
This commit is contained in:
Родитель
518c62afc8
Коммит
0fd00b47ab
|
@ -12,6 +12,16 @@ CHARSET=0
|
|||
; CHINESEBIG5_CHARSET = 136
|
||||
; OEM_CHARSET 255
|
||||
|
||||
WELCOMETITLEFONTNAME=Trebuchet MS Bold
|
||||
WELCOMETITLEFONTSIZE=14
|
||||
;The title text "Welcome to Mozilla Thunderbird" is too large to fit on the screen with a 14 pt
|
||||
;font. For now, use a 12 pt font to prevent the text from getting clipped because it is too big.
|
||||
WELCOMETITLEFONTSIZE_THUNDERBIRD=12
|
||||
WELCOMETITLEFONTWEIGHT=700
|
||||
;Here is a partial list font weight
|
||||
; FW_NORMAL = 400
|
||||
; FW_BOLD = 700
|
||||
|
||||
OK_=&OK
|
||||
OK=OK
|
||||
CANCEL=Cancel
|
||||
|
|
|
@ -233,15 +233,6 @@ void InitSequence(HINSTANCE hInstance)
|
|||
psh.nPages = count;
|
||||
|
||||
|
||||
// Create the Font for Intro/End page headers.
|
||||
#ifdef MOZ_THUNDERBIRD
|
||||
// The title text "Welcome to Mozilla Thunderbird" is too large to fit on the screen with a 14 pt
|
||||
// font. For now, use a 12 pt font to prevent the text from getting clipped because it is too big.
|
||||
sgInstallGui.welcomeTitleFont = MakeFont(TEXT("Trebuchet MS Bold"), 12, FW_BOLD);
|
||||
#else
|
||||
sgInstallGui.welcomeTitleFont = MakeFont(TEXT("Trebuchet MS Bold"), 14, FW_BOLD);
|
||||
#endif
|
||||
|
||||
// Start the Wizard.
|
||||
if (psh.nPages > 0) {
|
||||
PropertySheet(&psh);
|
||||
|
@ -282,8 +273,6 @@ void InitSequence(HINSTANCE hInstance)
|
|||
ProcessFileOpsForAll(T_DEPEND_REBOOT);
|
||||
}
|
||||
}
|
||||
|
||||
DeleteObject(sgInstallGui.welcomeTitleFont);
|
||||
}
|
||||
|
||||
HFONT MakeFont(TCHAR* aFaceName, int aFontSize, LONG aWeight)
|
||||
|
@ -356,14 +345,9 @@ LRESULT CALLBACK DlgProcWelcome(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam)
|
|||
{
|
||||
char szBuf[MAX_BUF];
|
||||
LPNMHDR notifyMessage;
|
||||
HWND hControl;
|
||||
|
||||
|
||||
switch(msg) {
|
||||
case WM_INITDIALOG:
|
||||
// The header on the welcome page uses a larger font.
|
||||
hControl = GetDlgItem(hDlg, IDC_STATIC_TITLE);
|
||||
SendMessage(hControl, WM_SETFONT, (WPARAM)sgInstallGui.welcomeTitleFont, (LPARAM)TRUE);
|
||||
|
||||
// UI Text, from localized config files
|
||||
wsprintf(szBuf, diWelcome.szMessageWelcome, sgProduct.szProductName);
|
||||
SetDlgItemText(hDlg, IDC_STATIC_TITLE, szBuf);
|
||||
|
@ -374,7 +358,9 @@ LRESULT CALLBACK DlgProcWelcome(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam)
|
|||
wsprintf(szBuf, diWelcome.szMessage3, sgProduct.szProductName);
|
||||
SetDlgItemText(hDlg, IDC_STATIC3, szBuf);
|
||||
|
||||
SendDlgItemMessage(hDlg, IDC_STATIC_TITLE, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L);
|
||||
// The header on the welcome page uses another font.
|
||||
SendDlgItemMessage(hDlg, IDC_STATIC_TITLE, WM_SETFONT, (WPARAM)sgInstallGui.welcomeTitleFont, 0L);
|
||||
|
||||
SendDlgItemMessage(hDlg, IDC_STATIC0, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L);
|
||||
SendDlgItemMessage(hDlg, IDC_STATIC1, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L);
|
||||
SendDlgItemMessage(hDlg, IDC_STATIC2, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L);
|
||||
|
@ -2039,7 +2025,6 @@ BOOL InstallFiles(HWND hDlg)
|
|||
LRESULT CALLBACK DlgProcWindowsIntegration(HWND hDlg, UINT msg, WPARAM wParam, LONG lParam)
|
||||
{
|
||||
LPNMHDR notifyMessage;
|
||||
char szBuf[MAX_BUF];
|
||||
|
||||
switch (msg) {
|
||||
case WM_INITDIALOG:
|
||||
|
@ -2118,7 +2103,6 @@ LRESULT CALLBACK DlgProcInstallSuccessful(HWND hDlg, UINT msg, WPARAM wParam, LO
|
|||
{
|
||||
char szBuf[MAX_BUF];
|
||||
LPNMHDR notifyMessage;
|
||||
HWND ctrl;
|
||||
static BOOL launchAppChecked = TRUE;
|
||||
static BOOL resetHomepageChecked = TRUE;
|
||||
DWORD result;
|
||||
|
@ -2126,10 +2110,6 @@ LRESULT CALLBACK DlgProcInstallSuccessful(HWND hDlg, UINT msg, WPARAM wParam, LO
|
|||
|
||||
switch(msg) {
|
||||
case WM_INITDIALOG:
|
||||
// The header on the welcome page uses a larger font.
|
||||
ctrl = GetDlgItem(hDlg, IDC_STATIC_TITLE);
|
||||
SendMessage(ctrl, WM_SETFONT, (WPARAM)sgInstallGui.welcomeTitleFont, (LPARAM)TRUE);
|
||||
|
||||
// UI Text, from localized config files
|
||||
SetDlgItemText(hDlg, IDC_STATIC_TITLE, diInstallSuccessful.szMessageHeader);
|
||||
wsprintf(szBuf, diInstallSuccessful.szMessage0, sgProduct.szProductName);
|
||||
|
@ -2139,7 +2119,9 @@ LRESULT CALLBACK DlgProcInstallSuccessful(HWND hDlg, UINT msg, WPARAM wParam, LO
|
|||
SetDlgItemText(hDlg, IDC_START_APP, szBuf);
|
||||
SetDlgItemText(hDlg, IDC_RESET_HOMEPAGE, diInstallSuccessful.szResetHomepage);
|
||||
|
||||
SendDlgItemMessage(hDlg, IDC_STATIC_TITLE, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L);
|
||||
// The header on the welcome page uses another font.
|
||||
SendDlgItemMessage(hDlg, IDC_STATIC_TITLE, WM_SETFONT, (WPARAM)sgInstallGui.welcomeTitleFont, 0L);
|
||||
|
||||
SendDlgItemMessage(hDlg, IDC_STATIC0, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L);
|
||||
SendDlgItemMessage(hDlg, IDC_STATIC1, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L);
|
||||
SendDlgItemMessage(hDlg, IDC_START_APP, WM_SETFONT, (WPARAM)sgInstallGui.definedFont, 0L);
|
||||
|
|
|
@ -7889,6 +7889,8 @@ HRESULT ParseInstallIni()
|
|||
{
|
||||
LOGFONT lf;
|
||||
NONCLIENTMETRICS ncm;
|
||||
char fontName[MAX_BUF];
|
||||
char fontSize[MAX_BUF];
|
||||
|
||||
/* get system font */
|
||||
memset(&ncm, 0, sizeof(ncm));
|
||||
|
@ -7905,7 +7907,21 @@ HRESULT ParseInstallIni()
|
|||
lf.lfHeight = -MulDiv(atoi(sgInstallGui.szFontSize), GetDeviceCaps(GetDC(NULL), LOGPIXELSY), 72);
|
||||
lf.lfCharSet = atoi(sgInstallGui.szCharSet);
|
||||
sgInstallGui.definedFont = CreateFontIndirect( &lf );
|
||||
|
||||
|
||||
/* get welcome title font */
|
||||
GetPrivateProfileString("General", "WELCOMETITLEFONTNAME", "", fontName, sizeof(fontName), szFileIniInstall);
|
||||
#ifdef MOZ_THUNDERBIRD
|
||||
GetPrivateProfileString("General", "WELCOMETITLEFONTSIZE_THUNDERBIRD", "", fontSize, sizeof(fontSize), szFileIniInstall);
|
||||
#else
|
||||
GetPrivateProfileString("General", "WELCOMETITLEFONTSIZE", "", fontSize, sizeof(fontSize), szFileIniInstall);
|
||||
#endif
|
||||
memset(&lf, 0, sizeof(lf));
|
||||
strcpy(lf.lfFaceName, fontName);
|
||||
lf.lfHeight = -MulDiv(atoi(fontSize), GetDeviceCaps(GetDC(NULL), LOGPIXELSY), 72);
|
||||
lf.lfWeight = GetPrivateProfileInt("General", "WELCOMETITLEFONTWEIGHT", 0, szFileIniInstall);
|
||||
lf.lfCharSet = atoi(sgInstallGui.szCharSet);
|
||||
sgInstallGui.welcomeTitleFont = CreateFontIndirect( &lf );
|
||||
|
||||
GetPrivateProfileString("General", "OK_", "", sgInstallGui.szOk_, sizeof(sgInstallGui.szOk_), szFileIniInstall);
|
||||
GetPrivateProfileString("General", "OK", "", sgInstallGui.szOk, sizeof(sgInstallGui.szOk), szFileIniInstall);
|
||||
GetPrivateProfileString("General", "CANCEL_", "", sgInstallGui.szCancel_, sizeof(sgInstallGui.szCancel_), szFileIniInstall);
|
||||
|
@ -9248,6 +9264,7 @@ void DeInitialize()
|
|||
FreeMemory(&szEStringNull);
|
||||
DeleteObject(sgInstallGui.systemFont);
|
||||
DeleteObject(sgInstallGui.definedFont);
|
||||
DeleteObject(sgInstallGui.welcomeTitleFont);
|
||||
|
||||
FreeLibrary(hSetupRscInst);
|
||||
if (hGREAppInstallerProxyDLL != NULL)
|
||||
|
|
Загрузка…
Ссылка в новой задаче