Add some spacing (not too much) between the screen borders and the "Safe Mode" and the ReactOS version string labels, in Safe Mode.

svn path=/trunk/; revision=58000
This commit is contained in:
Hermès Bélusca-Maïto 2012-12-24 17:34:13 +00:00
parent bf4bf38543
commit dcf5487663

View file

@ -973,7 +973,7 @@ IntPaintDesktop(HDC hDC)
} }
else else
{ {
/* Find the upper left corner, can be negtive if the bitmap is bigger then the screen */ /* Find the upper left corner, can be negative if the bitmap is bigger then the screen */
x = (sz.cx / 2) - (gspv.cxWallpaper / 2); x = (sz.cx / 2) - (gspv.cxWallpaper / 2);
y = (sz.cy / 2) - (gspv.cyWallpaper / 2); y = (sz.cy / 2) - (gspv.cyWallpaper / 2);
} }
@ -994,7 +994,7 @@ IntPaintDesktop(HDC hDC)
NtGdiSelectBrush(hDC, PreviousBrush); NtGdiSelectBrush(hDC, PreviousBrush);
} }
/*Do not fill the background after it is painted no matter the size of the picture */ /* Do not fill the background after it is painted no matter the size of the picture */
doPatBlt = FALSE; doPatBlt = FALSE;
hOldBitmap = NtGdiSelectBitmap(hWallpaperDC, gspv.hbmWallpaper); hOldBitmap = NtGdiSelectBitmap(hWallpaperDC, gspv.hbmWallpaper);
@ -1073,7 +1073,7 @@ IntPaintDesktop(HDC hDC)
* Display system version on the desktop background * Display system version on the desktop background
*/ */
if (g_PaintDesktopVersion||UserGetSystemMetrics(SM_CLEANBOOT)) if (g_PaintDesktopVersion || UserGetSystemMetrics(SM_CLEANBOOT))
{ {
static WCHAR s_wszVersion[256] = {0}; static WCHAR s_wszVersion[256] = {0};
RECTL rect; RECTL rect;
@ -1101,24 +1101,26 @@ IntPaintDesktop(HDC hDC)
if(!UserGetSystemMetrics(SM_CLEANBOOT)) if(!UserGetSystemMetrics(SM_CLEANBOOT))
{ {
GreExtTextOutW(hDC, rect.right-16, rect.bottom-48, 0, NULL, s_wszVersion, len, NULL, 0); GreExtTextOutW(hDC, rect.right - 16, rect.bottom - 48, 0, NULL, s_wszVersion, len, NULL, 0);
} }
else else
{ {
/* Safe Mode */ /* Safe Mode */
/* Version information text in top center */ /* Version information text in top center */
IntGdiSetTextAlign(hDC, TA_CENTER|TA_TOP); IntGdiSetTextAlign(hDC, TA_CENTER | TA_TOP);
GreExtTextOutW(hDC, (rect.right+rect.left)/2, rect.top, 0, NULL, s_wszVersion, len, NULL, 0); GreExtTextOutW(hDC, (rect.right + rect.left)/2, rect.top + 3, 0, NULL, s_wszVersion, len, NULL, 0);
/* Safe Mode text in corners */ /* Safe Mode text in corners */
len = wcslen(s_wszSafeMode); len = wcslen(s_wszSafeMode);
IntGdiSetTextAlign(hDC, TA_RIGHT|TA_TOP); IntGdiSetTextAlign(hDC, TA_LEFT | TA_TOP);
GreExtTextOutW(hDC, rect.right, rect.top, 0, NULL, s_wszSafeMode, len, NULL, 0); GreExtTextOutW(hDC, rect.left, rect.top + 3, 0, NULL, s_wszSafeMode, len, NULL, 0);
IntGdiSetTextAlign(hDC, TA_RIGHT|TA_BASELINE); IntGdiSetTextAlign(hDC, TA_RIGHT | TA_TOP);
GreExtTextOutW(hDC, rect.right, rect.bottom, 0, NULL, s_wszSafeMode, len, NULL, 0); GreExtTextOutW(hDC, rect.right, rect.top + 3, 0, NULL, s_wszSafeMode, len, NULL, 0);
IntGdiSetTextAlign(hDC, TA_LEFT|TA_TOP); IntGdiSetTextAlign(hDC, TA_LEFT | TA_BASELINE);
GreExtTextOutW(hDC, rect.left, rect.top, 0, NULL, s_wszSafeMode, len, NULL, 0); GreExtTextOutW(hDC, rect.left, rect.bottom - 5, 0, NULL, s_wszSafeMode, len, NULL, 0);
IntGdiSetTextAlign(hDC, TA_LEFT|TA_BASELINE); IntGdiSetTextAlign(hDC, TA_RIGHT | TA_BASELINE);
GreExtTextOutW(hDC, rect.left, rect.bottom, 0, NULL, s_wszSafeMode, len, NULL, 0); GreExtTextOutW(hDC, rect.right, rect.bottom - 5, 0, NULL, s_wszSafeMode, len, NULL, 0);
} }
IntGdiSetBkMode(hDC, mode_old); IntGdiSetBkMode(hDC, mode_old);