2 byte reduction yay
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1103 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
bc80ceac5c
commit
d94be8af2a
1 changed files with 4 additions and 3 deletions
|
@ -26,9 +26,10 @@ static LRESULT CALLBACK BG_WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM l
|
||||||
int rv,gv,bv;
|
int rv,gv,bv;
|
||||||
RECT rect;
|
RECT rect;
|
||||||
HBRUSH brush;
|
HBRUSH brush;
|
||||||
rv = (GetRValue(m_color2) * y + GetRValue(m_color1) * (r.bottom - y)) / r.bottom;
|
int ry=r.bottom-y;
|
||||||
gv = (GetGValue(m_color2) * y + GetGValue(m_color1) * (r.bottom - y)) / r.bottom;
|
rv = (GetRValue(m_color2) * y + GetRValue(m_color1) * ry) / r.bottom;
|
||||||
bv = (GetBValue(m_color2) * y + GetBValue(m_color1) * (r.bottom - y)) / r.bottom;
|
gv = (GetGValue(m_color2) * y + GetGValue(m_color1) * ry) / r.bottom;
|
||||||
|
bv = (GetBValue(m_color2) * y + GetBValue(m_color1) * ry) / r.bottom;
|
||||||
brush = CreateSolidBrush(RGB(rv,gv,bv));
|
brush = CreateSolidBrush(RGB(rv,gv,bv));
|
||||||
SetRect(&rect, r.left, y, r.right, y+4);
|
SetRect(&rect, r.left, y, r.right, y+4);
|
||||||
// note that we don't need to do "SelectObject(hdc, brush)"
|
// note that we don't need to do "SelectObject(hdc, brush)"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue