Syncing my changes with tree

svn path=/trunk/; revision=4762
This commit is contained in:
Richard Campbell 2003-05-26 10:52:15 +00:00
parent 2d32e95fa9
commit 7a4f224456
4 changed files with 11 additions and 57 deletions

View file

@ -1,4 +1,4 @@
/* $Id: desktop.c,v 1.11 2003/05/12 19:30:00 jfilby Exp $
/* $Id: desktop.c,v 1.12 2003/05/26 10:52:15 rcampbell Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS user32.dll
@ -39,7 +39,7 @@ SystemParametersInfoW(UINT uiAction,
/* FIXME: This should be obtained from the registry */
static LOGFONT CaptionFont =
{ 12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, OEM_CHARSET,
0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Helmet" };
0, 0, DEFAULT_QUALITY, FF_MODERN, L"Bitstream Vera Sans Bold" };
switch (uiAction)
{

View file

@ -1,4 +1,4 @@
/* $Id: defwnd.c,v 1.48 2003/05/25 21:05:38 rcampbell Exp $
/* $Id: defwnd.c,v 1.49 2003/05/26 10:52:15 rcampbell Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS user32.dll
@ -431,7 +431,7 @@ static void UserDrawCaptionNC( HDC hDC, RECT *rect, HWND hWnd,
else
hFont = CreateFontIndirectW(&nclm.lfCaptionFont);
hOldFont = SelectObject(hDC, hFont);
TextOutA(hDC, r.left + (GetSystemMetrics(SM_CXDLGFRAME) * 2), (r.top / 2) + (((int) nclm.lfCaptionFont.lfHeight) / 2) + (GetSystemMetrics(SM_CXDLGFRAME) / 2), buffer, strlen(buffer));
TextOutA(hDC, r.left + (GetSystemMetrics(SM_CXDLGFRAME) * 2), rect->top + (nclm.lfCaptionFont.lfHeight / 2), buffer, strlen(buffer));
DeleteObject (SelectObject (hDC, hOldFont));
}
}

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: scrollbar.c,v 1.6 2003/05/18 22:11:41 gvg Exp $
/* $Id: scrollbar.c,v 1.7 2003/05/26 10:52:15 rcampbell Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -78,10 +78,10 @@ SCROLL_GetScrollBarRect (PWINDOW_OBJECT Window, INT nBar, PRECT lprect)
break;
case SB_VERT:
lprect->left = ClientRect.right - WindowRect.left;
lprect->top = ClientRect.top - WindowRect.top;
lprect->right = lprect->left + NtUserGetSystemMetrics (SM_CXVSCROLL);
lprect->bottom = ClientRect.bottom - WindowRect.top;
lprect->left = (ClientRect.right - WindowRect.left);
lprect->top = (ClientRect.top - WindowRect.top) + 1;
lprect->right = (lprect->left + NtUserGetSystemMetrics (SM_CXVSCROLL));
lprect->bottom = (ClientRect.bottom - WindowRect.top) - 1;
if (Window->Style & WS_BORDER)
{
lprect->top--;
@ -102,52 +102,6 @@ SCROLL_GetScrollBarRect (PWINDOW_OBJECT Window, INT nBar, PRECT lprect)
return FALSE;
}
#if 0 /* The code below computes all kind of stuff without using it */
if (vertical)
pixels = lprect->bottom - lprect->top;
else
pixels = lprect->right - lprect->left;
info.cbSize = sizeof(SCROLLBARINFO);
SCROLL_GetScrollBarInfo (Window, nBar, &info);
if (pixels <= 2 * NtUserGetSystemMetrics (SM_CXVSCROLL) + SCROLL_MIN_RECT)
{
info.dxyLineButton = info.xyThumbTop = info.xyThumbBottom = 0;
}
else
{
arrowSize = NtUserGetSystemMetrics (SM_CXVSCROLL);
pixels -= (2 * (NtUserGetSystemMetrics (SM_CXVSCROLL) - SCROLL_ARROW_THUMB_OVERLAP));
/* Temporary initialization - to be removed once proper code is in */
info.dxyLineButton = info.xyThumbTop = info.xyThumbBottom = 0;
/* if (info->Page)
{
thumbSize = MulDiv(pixels,info->Page,(info->MaxVal-info->MinVal+1));
if (*thumbSize < SCROLL_MIN_THUMB) *thumbSize = SCROLL_MIN_THUMB;
}
else *thumbSize = NtUserGetSystemMetrics(SM_CXVSCROLL); */
/*
if (((pixels -= *thumbSize ) < 0) ||
((info->flags & ESB_DISABLE_BOTH) == ESB_DISABLE_BOTH))
{ */
/* Rectangle too small or scrollbar disabled -> no thumb */
/* *thumbPos = *thumbSize = 0;
}
else
{ */
/* INT max = info->MaxVal - max( info->Page-1, 0 );
if (info->MinVal >= max)
*thumbPos = *arrowSize - SCROLL_ARROW_THUMB_OVERLAP;
else
*thumbPos = *arrowSize - SCROLL_ARROW_THUMB_OVERLAP
+ MulDiv(pixels, (info->CurVal-info->MinVal),(max - info->MinVal));
} */
}
#endif
return vertical;
}

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: window.c,v 1.49 2003/05/23 23:12:02 rcampbell Exp $
/* $Id: window.c,v 1.50 2003/05/26 10:52:15 rcampbell Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -923,7 +923,7 @@ NtUserMoveWindow(
}
if (uStyle & WS_CAPTION)
Window->ClientRect.top += NtUserGetSystemMetrics(SM_CYCAPTION);
Window->ClientRect.top += NtUserGetSystemMetrics(SM_CYCAPTION) + 1;
if ( Window->Class->Class.lpszMenuName)
{
Window->ClientRect.top += NtUserGetSystemMetrics(SM_CYMENU);