Commit a4d8f32d authored by Nigel Liang's avatar Nigel Liang Committed by Alexandre Julliard

winecfg: Add menu font settings to desktop integration tab.

parent e027f029
......@@ -311,4 +311,5 @@ BEGIN
IDC_SYSPARAMS_ACTIVE_TITLE_TEXT "Psmo titulku aktivnho okna"
IDC_SYSPARAMS_INACTIVE_TITLE "Pozad titulku neaktivnho okna"
IDC_SYSPARAMS_INACTIVE_TITLE_TEXT "Psmo titulku neaktivnho okna"
IDC_SYSPARAMS_MSGBOX_TEXT "Message Box Text"
END
......@@ -306,4 +306,5 @@ BEGIN
IDC_SYSPARAMS_ACTIVE_TITLE_TEXT "Aktiver Titelleistentext"
IDC_SYSPARAMS_INACTIVE_TITLE "Inaktive Titelleiste"
IDC_SYSPARAMS_INACTIVE_TITLE_TEXT "Inaktiver Titelleistentext"
IDC_SYSPARAMS_MSGBOX_TEXT "Message Box Text"
END
......@@ -308,4 +308,5 @@ BEGIN
IDC_SYSPARAMS_ACTIVE_TITLE_TEXT "Active Title Text"
IDC_SYSPARAMS_INACTIVE_TITLE "Inactive Title Bar"
IDC_SYSPARAMS_INACTIVE_TITLE_TEXT "Inactive Title Text"
IDC_SYSPARAMS_MSGBOX_TEXT "Message Box Text"
END
......@@ -306,4 +306,5 @@ BEGIN
IDC_SYSPARAMS_ACTIVE_TITLE_TEXT "Texto de barra de ttulo activa"
IDC_SYSPARAMS_INACTIVE_TITLE "Barra de ttulo inactiva"
IDC_SYSPARAMS_INACTIVE_TITLE_TEXT "Texto de barra de ttulo inactiva"
IDC_SYSPARAMS_MSGBOX_TEXT "Message Box Text"
END
......@@ -306,4 +306,5 @@ BEGIN
IDC_SYSPARAMS_ACTIVE_TITLE_TEXT "Texte de la barre de titre active"
IDC_SYSPARAMS_INACTIVE_TITLE "Barre de titre inactive"
IDC_SYSPARAMS_INACTIVE_TITLE_TEXT "Texte de la barre de titre inactive"
IDC_SYSPARAMS_MSGBOX_TEXT "Message Box Text"
END
......@@ -308,4 +308,5 @@ BEGIN
IDC_SYSPARAMS_ACTIVE_TITLE_TEXT "활성된 제목 문자"
IDC_SYSPARAMS_INACTIVE_TITLE "비활성된 제목 막대"
IDC_SYSPARAMS_INACTIVE_TITLE_TEXT "비활성된 제목 문자"
IDC_SYSPARAMS_MSGBOX_TEXT "Message Box Text"
END
......@@ -305,4 +305,5 @@ BEGIN
IDC_SYSPARAMS_ACTIVE_TITLE_TEXT "Aktiv titteltekst"
IDC_SYSPARAMS_INACTIVE_TITLE "Inaktiv tittellinje"
IDC_SYSPARAMS_INACTIVE_TITLE_TEXT "Inaktiv titteltekst"
IDC_SYSPARAMS_MSGBOX_TEXT "Message Box Text"
END
......@@ -311,4 +311,5 @@ BEGIN
IDC_SYSPARAMS_ACTIVE_TITLE_TEXT "Tytu aktywnego okna"
IDC_SYSPARAMS_INACTIVE_TITLE "To nagwka nieaktywnego okna"
IDC_SYSPARAMS_INACTIVE_TITLE_TEXT "Tytu nieaktywnego okna"
IDC_SYSPARAMS_MSGBOX_TEXT "Message Box Text"
END
......@@ -307,6 +307,7 @@ BEGIN
IDC_SYSPARAMS_ACTIVE_TITLE_TEXT "Text bară de titlu activă"
IDC_SYSPARAMS_INACTIVE_TITLE "Bară de titlu inactivă"
IDC_SYSPARAMS_INACTIVE_TITLE_TEXT "Text bară de titlu inactivă"
IDC_SYSPARAMS_MSGBOX_TEXT "Message Box Text"
END
#pragma code_page(default)
......@@ -307,4 +307,5 @@ BEGIN
IDC_SYSPARAMS_ACTIVE_TITLE_TEXT " - "
IDC_SYSPARAMS_INACTIVE_TITLE " "
IDC_SYSPARAMS_INACTIVE_TITLE_TEXT " - "
IDC_SYSPARAMS_MSGBOX_TEXT "Message Box Text"
END
......@@ -231,3 +231,4 @@
#define IDC_SYSPARAMS_ACTIVE_TITLE_TEXT 8413
#define IDC_SYSPARAMS_INACTIVE_TITLE 8414
#define IDC_SYSPARAMS_INACTIVE_TITLE_TEXT 8415
#define IDC_SYSPARAMS_MSGBOX_TEXT 8416
......@@ -835,6 +835,7 @@ static struct
const char *color_reg;
int size;
COLORREF color;
LOGFONTW lf;
} metrics[] =
{
{-1, COLOR_BTNFACE, "ButtonFace" }, /* IDC_SYSPARAMS_BUTTON */
......@@ -852,7 +853,8 @@ static struct
{SM_CXSIZE, COLOR_ACTIVECAPTION, "ActiveTitle" }, /* IDC_SYSPARAMS_ACTIVE_TITLE */
{-1, COLOR_CAPTIONTEXT, "TitleText" }, /* IDC_SYSPARAMS_ACTIVE_TITLE_TEXT */
{-1, COLOR_INACTIVECAPTION, "InactiveTitle" }, /* IDC_SYSPARAMS_INACTIVE_TITLE */
{-1, COLOR_INACTIVECAPTIONTEXT,"InactiveTitleText" } /* IDC_SYSPARAMS_INACTIVE_TITLE_TEXT */
{-1, COLOR_INACTIVECAPTIONTEXT,"InactiveTitleText" }, /* IDC_SYSPARAMS_INACTIVE_TITLE_TEXT */
{-1, -1, "MsgBoxText" } /* IDC_SYSPARAMS_MSGBOX_TEXT */
};
static void save_sys_color(int idx, COLORREF clr)
......@@ -867,6 +869,7 @@ static void read_sysparams(HWND hDlg)
{
WCHAR buffer[256];
HWND list = GetDlgItem(hDlg, IDC_SYSPARAM_COMBO);
NONCLIENTMETRICSW nonclient_metrics;
int i, idx;
for (i = 0; i < sizeof(metrics) / sizeof(metrics[0]); i++)
......@@ -881,6 +884,18 @@ static void read_sysparams(HWND hDlg)
if (metrics[i].color_idx != -1)
metrics[i].color = GetSysColor(metrics[i].color_idx);
}
nonclient_metrics.cbSize = sizeof(NONCLIENTMETRICSW);
SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICSW), &nonclient_metrics, 0);
memcpy(&(metrics[IDC_SYSPARAMS_MENU_TEXT - IDC_SYSPARAMS_BUTTON].lf),
&(nonclient_metrics.lfMenuFont), sizeof(LOGFONTW));
memcpy(&(metrics[IDC_SYSPARAMS_ACTIVE_TITLE_TEXT - IDC_SYSPARAMS_BUTTON].lf),
&(nonclient_metrics.lfCaptionFont), sizeof(LOGFONTW));
memcpy(&(metrics[IDC_SYSPARAMS_TOOLTIP_TEXT - IDC_SYSPARAMS_BUTTON].lf),
&(nonclient_metrics.lfStatusFont), sizeof(LOGFONTW));
memcpy(&(metrics[IDC_SYSPARAMS_MSGBOX_TEXT - IDC_SYSPARAMS_BUTTON].lf),
&(nonclient_metrics.lfMessageFont), sizeof(LOGFONTW));
}
static void apply_sysparams(void)
......@@ -900,6 +915,19 @@ static void apply_sysparams(void)
nonclient_metrics.iScrollWidth = nonclient_metrics.iScrollHeight =
metrics[IDC_SYSPARAMS_SCROLLBAR - IDC_SYSPARAMS_BUTTON].size;
memcpy(&(nonclient_metrics.lfMenuFont),
&(metrics[IDC_SYSPARAMS_MENU_TEXT - IDC_SYSPARAMS_BUTTON].lf),
sizeof(LOGFONTW));
memcpy(&(nonclient_metrics.lfCaptionFont),
&(metrics[IDC_SYSPARAMS_ACTIVE_TITLE_TEXT - IDC_SYSPARAMS_BUTTON].lf),
sizeof(LOGFONTW));
memcpy(&(nonclient_metrics.lfStatusFont),
&(metrics[IDC_SYSPARAMS_TOOLTIP_TEXT - IDC_SYSPARAMS_BUTTON].lf),
sizeof(LOGFONTW));
memcpy(&(nonclient_metrics.lfMessageFont),
&(metrics[IDC_SYSPARAMS_MSGBOX_TEXT - IDC_SYSPARAMS_BUTTON].lf),
sizeof(LOGFONTW));
SystemParametersInfoW(SPI_SETNONCLIENTMETRICS, sizeof(nonclient_metrics), &nonclient_metrics,
SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);
......@@ -932,6 +960,13 @@ static void on_sysparam_change(HWND hDlg)
else
set_text(hDlg, IDC_SYSPARAM_SIZE, "");
EnableWindow(GetDlgItem(hDlg, IDC_SYSPARAM_FONT),
index == IDC_SYSPARAMS_MENU_TEXT-IDC_SYSPARAMS_BUTTON ||
index == IDC_SYSPARAMS_ACTIVE_TITLE_TEXT-IDC_SYSPARAMS_BUTTON ||
index == IDC_SYSPARAMS_TOOLTIP_TEXT-IDC_SYSPARAMS_BUTTON ||
index == IDC_SYSPARAMS_MSGBOX_TEXT-IDC_SYSPARAMS_BUTTON
);
updating_ui = FALSE;
}
......@@ -970,6 +1005,21 @@ static void on_draw_item(HWND hDlg, WPARAM wParam, LPARAM lParam)
}
}
static void on_select_font(HWND hDlg)
{
CHOOSEFONTW cf;
int index = SendDlgItemMessageW(hDlg, IDC_SYSPARAM_COMBO, CB_GETCURSEL, 0, 0);
index = SendDlgItemMessageW(hDlg, IDC_SYSPARAM_COMBO, CB_GETITEMDATA, index, 0);
ZeroMemory(&cf, sizeof(cf));
cf.lStructSize = sizeof(CHOOSEFONTW);
cf.hwndOwner = hDlg;
cf.lpLogFont = &(metrics[index].lf);
cf.Flags = CF_SCREENFONTS | CF_INITTOLOGFONTSTRUCT | CF_NOSCRIPTSEL;
ChooseFontW(&cf);
}
INT_PTR CALLBACK
ThemeDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
......@@ -1030,6 +1080,10 @@ ThemeDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
on_theme_install (hDlg);
break;
case IDC_SYSPARAM_FONT:
on_select_font(hDlg);
break;
case IDC_BROWSE_SFPATH:
if (browse_for_unix_folder(hDlg, psfiSelected->szLinkTarget)) {
update_shell_folder_listview(hDlg);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment