request #990249 - Speedup BGGradient painting (was actually a bug)
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3632 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
3e062ee8a6
commit
cd663b221e
1 changed files with 4 additions and 3 deletions
|
@ -37,6 +37,7 @@ LRESULT CALLBACK BG_WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
GetClientRect(hwnd,&r);
|
GetClientRect(hwnd,&r);
|
||||||
// this portion by Drew Davidson, drewdavidson@mindspring.com
|
// this portion by Drew Davidson, drewdavidson@mindspring.com
|
||||||
ry=r.bottom;
|
ry=r.bottom;
|
||||||
|
r.bottom=0;
|
||||||
|
|
||||||
// JF: made slower, reduced to 4 pixels high, because I like how it looks better/
|
// JF: made slower, reduced to 4 pixels high, because I like how it looks better/
|
||||||
while (r.top < ry)
|
while (r.top < ry)
|
||||||
|
@ -50,18 +51,18 @@ LRESULT CALLBACK BG_WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
brush = CreateBrushIndirect(&lh);
|
brush = CreateBrushIndirect(&lh);
|
||||||
// note that we don't need to do "SelectObject(hdc, brush)"
|
// note that we don't need to do "SelectObject(hdc, brush)"
|
||||||
// because FillRect lets us specify the brush as a parameter.
|
// because FillRect lets us specify the brush as a parameter.
|
||||||
|
r.bottom+=4;
|
||||||
FillRect(hdc, &r, brush);
|
FillRect(hdc, &r, brush);
|
||||||
DeleteObject(brush);
|
DeleteObject(brush);
|
||||||
r.top+=4;
|
r.top+=4;
|
||||||
r.bottom+=4;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (header->bg_textcolor != -1)
|
if (header->bg_textcolor != -1)
|
||||||
{
|
{
|
||||||
HFONT oldFont;
|
|
||||||
HFONT newFont = CreateFontIndirect((LOGFONT *) header->blocks[NB_BGFONT].offset);
|
HFONT newFont = CreateFontIndirect((LOGFONT *) header->blocks[NB_BGFONT].offset);
|
||||||
if (newFont)
|
if (newFont)
|
||||||
{
|
{
|
||||||
|
HFONT oldFont;
|
||||||
r.left=16;
|
r.left=16;
|
||||||
r.top=8;
|
r.top=8;
|
||||||
SetBkMode(hdc,TRANSPARENT);
|
SetBkMode(hdc,TRANSPARENT);
|
||||||
|
@ -74,7 +75,7 @@ LRESULT CALLBACK BG_WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
}
|
}
|
||||||
EndPaint(hwnd,&ps);
|
EndPaint(hwnd,&ps);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return DefWindowProc(hwnd,uMsg,wParam,lParam);
|
return DefWindowProc(hwnd,uMsg,wParam,lParam);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue