From d8967087af559a43f1801e3e89411d570cbb3110 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sun, 22 Sep 2013 17:14:55 +0000 Subject: plugins cleanup git-svn-id: http://svn.miranda-ng.org/main/trunk@6185 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/FloatingContacts/src/thumbs.cpp | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) (limited to 'plugins/FloatingContacts/src/thumbs.cpp') diff --git a/plugins/FloatingContacts/src/thumbs.cpp b/plugins/FloatingContacts/src/thumbs.cpp index 180637b9f5..ae14979ff0 100644 --- a/plugins/FloatingContacts/src/thumbs.cpp +++ b/plugins/FloatingContacts/src/thumbs.cpp @@ -470,7 +470,7 @@ void ThumbInfo::ThumbDeselect(BOOL bMouse) void ThumbInfo::SetThumbOpacity(BYTE bAlpha) { - if (pUpdateLayeredWindow && (bAlpha != btAlpha)) { + if (bAlpha != btAlpha) { btAlpha = bAlpha; UpdateContent(); } @@ -673,25 +673,18 @@ void ThumbInfo::UpdateContent() SetTextColor(hdcDraw, oldColor); SetBkMode(hdcDraw, oldBkMode); - if (pUpdateLayeredWindow) { - SetWindowLongPtr( hwnd, GWL_EXSTYLE, GetWindowLongPtr(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED ); + SetWindowLongPtr( hwnd, GWL_EXSTYLE, GetWindowLongPtr(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED ); - RECT rc; GetWindowRect(hwnd, &rc); - POINT ptDst = {rc.left, rc.top}; - POINT ptSrc = {0, 0}; + GetWindowRect(hwnd, &rc); + POINT ptDst = {rc.left, rc.top}; + POINT ptSrc = {0, 0}; - BLENDFUNCTION blend; - blend.BlendOp = AC_SRC_OVER; - blend.BlendFlags = 0; - blend.SourceConstantAlpha = 255; - blend.AlphaFormat = AC_SRC_ALPHA; + blend.BlendOp = AC_SRC_OVER; + blend.BlendFlags = 0; + blend.SourceConstantAlpha = 255; + blend.AlphaFormat = AC_SRC_ALPHA; - pUpdateLayeredWindow(hwnd, NULL, &ptDst, &szSize, bmpContent.getDC(), &ptSrc, 0xffffffff, &blend, ULW_ALPHA); - } - else { - RedrawWindow(hwnd, NULL, NULL, RDW_INVALIDATE); - UpdateWindow(hwnd); - } + UpdateLayeredWindow(hwnd, NULL, &ptDst, &szSize, bmpContent.getDC(), &ptSrc, 0xffffffff, &blend, ULW_ALPHA); } void ThumbInfo::PopupMessageDialog( ) -- cgit v1.2.3