diff options
author | George Hazan <george.hazan@gmail.com> | 2013-10-24 15:21:30 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-10-24 15:21:30 +0000 |
commit | 5e01c907bf4cace9542f880bae418f71c0fd0c07 (patch) | |
tree | 4e8b60aa99bcc10540be4b0ca09bcb313ff78677 /plugins/Clist_nicer/src/alphablend.cpp | |
parent | 4a4b816398add26a704f13af1aa2ff5023df01af (diff) |
more warning fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@6608 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_nicer/src/alphablend.cpp')
-rw-r--r-- | plugins/Clist_nicer/src/alphablend.cpp | 58 |
1 files changed, 28 insertions, 30 deletions
diff --git a/plugins/Clist_nicer/src/alphablend.cpp b/plugins/Clist_nicer/src/alphablend.cpp index 1b93fbf652..23cf9d76a2 100644 --- a/plugins/Clist_nicer/src/alphablend.cpp +++ b/plugins/Clist_nicer/src/alphablend.cpp @@ -47,38 +47,36 @@ DWORD __forceinline argb_from_cola(COLORREF col, UINT32 alpha) void __forceinline DrawBorderStyle(HDC hdcwnd, RECT *rc, DWORD BORDERSTYLE)
{
- if (BORDERSTYLE >= 0) {
- HPEN hPenOld = 0;
- POINT pt;
+ HPEN hPenOld = 0;
+ POINT pt;
- switch(BORDERSTYLE) {
- case BDR_RAISEDOUTER: // raised
- MoveToEx(hdcwnd, rc->left, rc->bottom - 1, &pt);
- hPenOld = reinterpret_cast<HPEN>(SelectObject(hdcwnd, cfg::dat.hPen3DBright));
- LineTo(hdcwnd, rc->left, rc->top);
- LineTo(hdcwnd, rc->right, rc->top);
- SelectObject(hdcwnd, cfg::dat.hPen3DDark);
- MoveToEx(hdcwnd, rc->right - 1, rc->top + 1, &pt);
- LineTo(hdcwnd, rc->right - 1, rc->bottom - 1);
- LineTo(hdcwnd, rc->left - 1, rc->bottom - 1);
- break;
- case BDR_SUNKENINNER:
- MoveToEx(hdcwnd, rc->left, rc->bottom - 1, &pt);
- hPenOld = reinterpret_cast<HPEN>(SelectObject(hdcwnd, cfg::dat.hPen3DDark));
- LineTo(hdcwnd, rc->left, rc->top);
- LineTo(hdcwnd, rc->right, rc->top);
- MoveToEx(hdcwnd, rc->right - 1, rc->top + 1, &pt);
- SelectObject(hdcwnd, cfg::dat.hPen3DBright);
- LineTo(hdcwnd, rc->right - 1, rc->bottom - 1);
- LineTo(hdcwnd, rc->left, rc->bottom - 1);
- break;
- default:
- DrawEdge(hdcwnd, rc, BORDERSTYLE, BF_RECT | BF_SOFT);
- break;
- }
- if (hPenOld)
- SelectObject(hdcwnd, hPenOld);
+ switch(BORDERSTYLE) {
+ case BDR_RAISEDOUTER: // raised
+ MoveToEx(hdcwnd, rc->left, rc->bottom - 1, &pt);
+ hPenOld = reinterpret_cast<HPEN>(SelectObject(hdcwnd, cfg::dat.hPen3DBright));
+ LineTo(hdcwnd, rc->left, rc->top);
+ LineTo(hdcwnd, rc->right, rc->top);
+ SelectObject(hdcwnd, cfg::dat.hPen3DDark);
+ MoveToEx(hdcwnd, rc->right - 1, rc->top + 1, &pt);
+ LineTo(hdcwnd, rc->right - 1, rc->bottom - 1);
+ LineTo(hdcwnd, rc->left - 1, rc->bottom - 1);
+ break;
+ case BDR_SUNKENINNER:
+ MoveToEx(hdcwnd, rc->left, rc->bottom - 1, &pt);
+ hPenOld = reinterpret_cast<HPEN>(SelectObject(hdcwnd, cfg::dat.hPen3DDark));
+ LineTo(hdcwnd, rc->left, rc->top);
+ LineTo(hdcwnd, rc->right, rc->top);
+ MoveToEx(hdcwnd, rc->right - 1, rc->top + 1, &pt);
+ SelectObject(hdcwnd, cfg::dat.hPen3DBright);
+ LineTo(hdcwnd, rc->right - 1, rc->bottom - 1);
+ LineTo(hdcwnd, rc->left, rc->bottom - 1);
+ break;
+ default:
+ DrawEdge(hdcwnd, rc, BORDERSTYLE, BF_RECT | BF_SOFT);
+ break;
}
+ if (hPenOld)
+ SelectObject(hdcwnd, hPenOld);
}
void DrawAlpha(HDC hdcwnd, PRECT rc, DWORD basecolor, int alpha, DWORD basecolor2, BOOL transparent, BYTE FLG_GRADIENT, BYTE FLG_CORNER, DWORD BORDERSTYLE, ImageItem *imageItem)
{
|