Bug 502526 - Need splashscreen artwork for Windows CE. artwork=horlander, ui-r=faaborg, r=vladimir

This commit is contained in:
Justin Dolske 2009-08-20 15:17:29 -07:00
parent eb283d7099
commit ef0be5285c
4 changed files with 25 additions and 30 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 250 KiB

After

Width:  |  Height:  |  Size: 232 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 250 KiB

After

Width:  |  Height:  |  Size: 232 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 KiB

After

Width:  |  Height:  |  Size: 232 KiB

View File

@ -237,6 +237,9 @@ nsSplashScreenWin::Update(PRInt32 progress)
void
nsSplashScreenWin::OnPaint(HDC dc, const PAINTSTRUCT *ps)
{
RECT progressBar;
// Paint the splash screen
if (mSplashBitmapDC) {
BitBlt(dc,
0, 0, gSplashScreen->mWidth, gSplashScreen->mHeight,
@ -250,40 +253,32 @@ nsSplashScreenWin::OnPaint(HDC dc, const PAINTSTRUCT *ps)
DeleteObject(bkgr);
}
#define BOTTOM_OFFSET 10
#define PROGRESS_HEIGHT 11
// Size of progress bar area
if (mSplashBitmapDC &&
gSplashScreen->mWidth == 440 &&
gSplashScreen->mHeight == 180) {
// For now we're tightly tied to a specific splash.bmp design,
// ideally we would determine the region automagically.
progressBar.left = 183;
progressBar.right = 410;
progressBar.top = 148;
progressBar.bottom = 153;
} else {
// The default progress bar will be 2/3 the width of the splash box,
// 9 pixels tall, 10 pixels from the bottom.
progressBar.left = (mWidth / 6);
progressBar.right = mWidth - (mWidth / 6);
progressBar.top = mHeight - 19;
progressBar.bottom = mHeight - 10;
}
if (mProgress != -1) {
HBRUSH border = CreateSolidBrush(RGB(0x33,0x33,0x99));
HBRUSH fill = CreateSolidBrush(RGB(0x33,0x66,0xFF));
HBRUSH fill = CreateSolidBrush(RGB(0x77,0xC7,0x1C));
// the progress bar goes 15 pixels above the bottom of the window,
// and is 2/3 of the width. The outer border is 11 px in height,
// which will be inset by 2 to draw the fill.
int leftBorder = (mWidth * 2 / 3) / 2;
int maxWidth = progressBar.right - progressBar.left;
progressBar.right = progressBar.left + maxWidth * mProgress / 100;
FillRect(dc, &progressBar, fill);
// left, top, right, bottom
RECT outerRect = { leftBorder, mHeight - BOTTOM_OFFSET - PROGRESS_HEIGHT,
mWidth - leftBorder, mHeight - BOTTOM_OFFSET };
HBRUSH oldBrush = (HBRUSH)SelectObject(dc, border);
MoveToEx(dc, outerRect.left, outerRect.top, (LPPOINT) NULL);
LineTo(dc, outerRect.right, outerRect.top);
LineTo(dc, outerRect.right, outerRect.bottom);
LineTo(dc, outerRect.left, outerRect.bottom);
LineTo(dc, outerRect.left, outerRect.top);
SelectObject(dc, oldBrush);
outerRect.top += 2;
outerRect.left += 2;
outerRect.right -= 2;
outerRect.bottom -= 1;
outerRect.right = outerRect.left + (outerRect.right - outerRect.left) * mProgress / 100;
FillRect(dc, &outerRect, fill);
DeleteObject(border);
DeleteObject(fill);
}
}