[ros-diffs] [ekohl] 25804: - Enable/disable the size updown control when another window item is selected. - Remove the text when the size edit control gets disabled. - Disable the secondary color for the window item.

ekohl at svn.reactos.org ekohl at svn.reactos.org
Thu Feb 15 15:12:36 CET 2007


Author: ekohl
Date: Thu Feb 15 17:12:36 2007
New Revision: 25804

URL: http://svn.reactos.org/svn/reactos?rev=25804&view=rev
Log:
- Enable/disable the size updown control when another window item is selected.
- Remove the text when the size edit control gets disabled.
- Disable the secondary color for the window item.

Modified:
    trunk/reactos/dll/cpl/desk/advappdlg.c
    trunk/reactos/dll/cpl/desk/appearance.c

Modified: trunk/reactos/dll/cpl/desk/advappdlg.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/advappdlg.c?rev=25804&r1=25803&r2=25804&view=diff
==============================================================================
--- trunk/reactos/dll/cpl/desk/advappdlg.c (original)
+++ trunk/reactos/dll/cpl/desk/advappdlg.c Thu Feb 15 17:12:36 2007
@@ -309,6 +309,7 @@
 
 	/* First enable / disable the controls */
 	EnableWindow(GetDlgItem(hwndDlg, IDC_ADVAPPEARANCE_SIZE_E), (g_Assignment[iElement].Size != -1));
+	EnableWindow(GetDlgItem(hwndDlg, IDC_ADVAPPEARANCE_SIZE_UD), (g_Assignment[iElement].Size != -1));
 	EnableWindow(GetDlgItem(hwndDlg, IDC_ADVAPPEARANCE_SIZE_T), (g_Assignment[iElement].Size != -1));
 	EnableWindow(GetDlgItem(hwndDlg, IDC_ADVAPPEARANCE_COLOR1_T), (g_Assignment[iElement].Color1 != -1));
 	EnableWindow(GetDlgItem(hwndDlg, IDC_ADVAPPEARANCE_COLOR2_T), (g_Assignment[iElement].Color2 != -1));
@@ -325,7 +326,10 @@
 	UpdateButtonColor(hwndDlg, IDC_ADVAPPEARANCE_COLOR2_B, 1, g_Assignment[iElement].Color2);
 	UpdateButtonColor(hwndDlg, IDC_ADVAPPEARANCE_FONTCOLOR_B, 2, g_Assignment[iElement].FontColor);
 
-	SetDlgItemInt(hwndDlg, IDC_ADVAPPEARANCE_SIZE_E, g_Assignment[iElement].Size == -1 ? 0 : g->ThemeAdv.Size[g_Assignment[iElement].Size], FALSE);
+	if (g_Assignment[iElement].Size != -1)
+		SetDlgItemInt(hwndDlg, IDC_ADVAPPEARANCE_SIZE_E, g->ThemeAdv.Size[g_Assignment[iElement].Size], FALSE);
+	else
+		SetDlgItemText(hwndDlg, IDC_ADVAPPEARANCE_SIZE_E, TEXT(""));
 
 	HDC hdcDlg = GetDC(hwndDlg);	
 	if (g_Assignment[iElement].Font != -1)

Modified: trunk/reactos/dll/cpl/desk/appearance.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/appearance.c?rev=25804&r1=25803&r2=25804&view=diff
==============================================================================
--- trunk/reactos/dll/cpl/desk/appearance.c (original)
+++ trunk/reactos/dll/cpl/desk/appearance.c Thu Feb 15 17:12:36 2007
@@ -25,7 +25,7 @@
   {SIZE_BORDER_X,	SIZE_BORDER_Y,	COLOR_ACTIVEBORDER,		-1,								-1,				-1},				/* active window border */
   {SIZE_MENU_X,		SIZE_MENU_Y,	COLOR_MENU,				-1, 							FONT_MENU,		COLOR_MENUTEXT},	/* menu */
   {SIZE_MENU_X,		SIZE_MENU_Y,	COLOR_HIGHLIGHT,		-1,								FONT_HILIGHT,	COLOR_HIGHLIGHTTEXT},/* marked element */
-  {-1,				-1,				COLOR_WINDOW,			COLOR_WINDOWFRAME,				-1,				COLOR_WINDOWTEXT},	/* window */
+  {-1,				-1,				COLOR_WINDOW,			-1 /*COLOR_WINDOWFRAME*/,				-1,				COLOR_WINDOWTEXT},	/* window */
   {SIZE_SCROLL_X,	SIZE_SCROLL_Y,	COLOR_SCROLLBAR,		-1,								-1,				-1},				/* scroll bar */
   {-1,				-1,				COLOR_3DFACE,			-1,								-1,				COLOR_BTNTEXT},		/* 3d objects */
   {SIZE_SMCAPTION_Y,-1,				-1,						-1,								FONT_SMCAPTION,	-1},				/* palette window caption */




More information about the Ros-diffs mailing list