From 16b032b455187e39bad70fd102d2826f787614f3 Mon Sep 17 00:00:00 2001 From: Rafal Harabien Date: Sun, 1 May 2011 15:07:35 +0000 Subject: [PATCH] [DESK] * Fix a bug when after changing color scheme Apply and then OK is clicked. Background color was restored to the previous one in this case. Spotted by Gabriel Ilardi. svn path=/trunk/; revision=51531 --- reactos/dll/cpl/desk/appearance.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/reactos/dll/cpl/desk/appearance.c b/reactos/dll/cpl/desk/appearance.c index 65e9ad6890a..7670f4c9e00 100644 --- a/reactos/dll/cpl/desk/appearance.c +++ b/reactos/dll/cpl/desk/appearance.c @@ -115,12 +115,14 @@ AppearancePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) hwndDlg, AdvAppearanceDlgProc, (LPARAM)g) == IDOK) { PropSheet_Changed(GetParent(hwndDlg), hwndDlg); - g->Theme = g->ThemeAdv; - g_GlobalData.desktop_color = g->Theme.crColor[COLOR_DESKTOP]; g->bHasChanged = TRUE; + g->Theme = g->ThemeAdv; g->ThemeId = -1; /* Customized */ + g_GlobalData.desktop_color = g->Theme.crColor[COLOR_DESKTOP]; + SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_COLORSCHEME, CB_SETCURSEL, (WPARAM)-1, 0); SetDlgItemText(hwndDlg, IDC_APPEARANCE_COLORSCHEME, TEXT("")); + SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_PREVIEW, PVM_UPDATETHEME, 0, (LPARAM)&g->Theme); } break; @@ -136,6 +138,7 @@ AppearancePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { g->Theme = Theme; g->ThemeId = ThemeId; + g_GlobalData.desktop_color = g->Theme.crColor[COLOR_DESKTOP]; SendDlgItemMessage(hwndDlg, IDC_APPEARANCE_PREVIEW, PVM_UPDATETHEME, 0, (LPARAM)&Theme); } }