mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
Bug 502526 - Need splashscreen artwork for Windows CE. artwork=horlander, ui-r=faaborg, r=vladimir
This commit is contained in:
parent
eb283d7099
commit
ef0be5285c
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 |
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user