Author: mkupfer
Date: Sun Dec 20 19:48:34 2009
New Revision: 44675
URL:
http://svn.reactos.org/svn/reactos?rev=44675&view=rev
Log:
- remove SmallDiam for check boxes and radio butttons
- TODO: needs some fixes to adjust the checkmark vertically
Modified:
trunk/reactos/dll/win32/user32/windows/draw.c
Modified: trunk/reactos/dll/win32/user32/windows/draw.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/d…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/draw.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/draw.c [iso-8859-1] Sun Dec 20 19:48:34 2009
@@ -701,10 +701,9 @@
static BOOL UITOOLS95_DFC_ButtonCheckRadio(HDC dc, LPRECT r, UINT uFlags, BOOL Radio)
{
- RECT rc;
LOGFONTW lf;
HFONT hFont, hOldFont;
- int SmallDiam, i;
+ int i;
TCHAR OutRight, OutLeft, InRight, InLeft, Center;
if (Radio)
@@ -723,10 +722,8 @@
Center = 'g'; // center
}
- SmallDiam = UITOOLS_MakeSquareRect(r, &rc);
-
ZeroMemory(&lf, sizeof(LOGFONTW));
- lf.lfHeight = SmallDiam;
+ lf.lfHeight = r->top - r->bottom;
lf.lfWidth = 0;
lf.lfWeight = FW_NORMAL;
lf.lfCharSet = DEFAULT_CHARSET;
@@ -738,12 +735,12 @@
{
SetBkMode(dc, OPAQUE);
SetTextColor(dc, GetSysColor(COLOR_WINDOWFRAME));
- TextOut(dc, rc.left, rc.top, &Center, 1);
+ TextOut(dc, r->left, r->top, &Center, 1);
SetBkMode(dc, TRANSPARENT);
SetTextColor(dc, GetSysColor(COLOR_WINDOWFRAME));
- TextOut(dc, rc.left, rc.top, &OutRight, 1);
+ TextOut(dc, r->left, r->top, &OutRight, 1);
SetTextColor(dc, GetSysColor(COLOR_WINDOWFRAME));
- TextOut(dc, rc.left, rc.top, &OutLeft, 1);
+ TextOut(dc, r->left, r->top, &OutLeft, 1);
}
else
{
@@ -752,26 +749,26 @@
/* Center section, white for active, grey for inactive */
i= !(uFlags & (DFCS_INACTIVE|DFCS_PUSHED)) ? COLOR_WINDOW : COLOR_BTNFACE;
SetTextColor(dc, GetSysColor(i));
- TextOut(dc, rc.left, rc.top, &Center, 1);
+ TextOut(dc, r->left, r->top, &Center, 1);
if(uFlags & (DFCS_FLAT | DFCS_MONO))
{
SetTextColor(dc, GetSysColor(COLOR_WINDOWFRAME));
- TextOut(dc, rc.left, rc.top, &OutRight, 1);
- TextOut(dc, rc.left, rc.top, &OutLeft, 1);
- TextOut(dc, rc.left, rc.top, &InRight, 1);
- TextOut(dc, rc.left, rc.top, &InLeft, 1);
+ TextOut(dc, r->left, r->top, &OutRight, 1);
+ TextOut(dc, r->left, r->top, &OutLeft, 1);
+ TextOut(dc, r->left, r->top, &InRight, 1);
+ TextOut(dc, r->left, r->top, &InLeft, 1);
}
else
{
SetTextColor(dc, GetSysColor(COLOR_BTNSHADOW));
- TextOut(dc, rc.left, rc.top, &OutRight, 1);
+ TextOut(dc, r->left, r->top, &OutRight, 1);
SetTextColor(dc, GetSysColor(COLOR_BTNHIGHLIGHT));
- TextOut(dc, rc.left, rc.top, &OutLeft, 1);
+ TextOut(dc, r->left, r->top, &OutLeft, 1);
SetTextColor(dc, GetSysColor(COLOR_3DDKSHADOW));
- TextOut(dc, rc.left, rc.top, &InRight, 1);
+ TextOut(dc, r->left, r->top, &InRight, 1);
SetTextColor(dc, GetSysColor(COLOR_3DLIGHT));
- TextOut(dc, rc.left, rc.top, &InLeft, 1);
+ TextOut(dc, r->left, r->top, &InLeft, 1);
}
}
@@ -780,7 +777,7 @@
TCHAR Check = (Radio) ? 'i' : 'b';
SetTextColor(dc, GetSysColor(COLOR_WINDOWTEXT));
- TextOut(dc, rc.left, rc.top, &Check, 1);
+ TextOut(dc, r->left, r->top, &Check, 1);
}
SetTextColor(dc, GetSysColor(COLOR_WINDOWTEXT));