From 7a4f224456d191a2edc05fc7d1cb8faa42ebee55 Mon Sep 17 00:00:00 2001 From: Richard Campbell Date: Mon, 26 May 2003 10:52:15 +0000 Subject: [PATCH] Syncing my changes with tree svn path=/trunk/; revision=4762 --- reactos/lib/user32/misc/desktop.c | 4 +- reactos/lib/user32/windows/defwnd.c | 4 +- reactos/subsys/win32k/ntuser/scrollbar.c | 56 +++--------------------- reactos/subsys/win32k/ntuser/window.c | 4 +- 4 files changed, 11 insertions(+), 57 deletions(-) diff --git a/reactos/lib/user32/misc/desktop.c b/reactos/lib/user32/misc/desktop.c index 18fe0630be1..280fe1069d4 100644 --- a/reactos/lib/user32/misc/desktop.c +++ b/reactos/lib/user32/misc/desktop.c @@ -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) { diff --git a/reactos/lib/user32/windows/defwnd.c b/reactos/lib/user32/windows/defwnd.c index 3e2b9178c9d..02e0516ad61 100644 --- a/reactos/lib/user32/windows/defwnd.c +++ b/reactos/lib/user32/windows/defwnd.c @@ -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)); } } diff --git a/reactos/subsys/win32k/ntuser/scrollbar.c b/reactos/subsys/win32k/ntuser/scrollbar.c index bfeef2bc824..fc2130c2987 100644 --- a/reactos/subsys/win32k/ntuser/scrollbar.c +++ b/reactos/subsys/win32k/ntuser/scrollbar.c @@ -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; } diff --git a/reactos/subsys/win32k/ntuser/window.c b/reactos/subsys/win32k/ntuser/window.c index 2dfbb44f120..4b37e126eec 100644 --- a/reactos/subsys/win32k/ntuser/window.c +++ b/reactos/subsys/win32k/ntuser/window.c @@ -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);