summaryrefslogtreecommitdiff
path: root/src/modules/button
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-01-21 20:04:48 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-01-21 20:04:48 +0000
commitd154673f93ad95197bce8cadb995daa5bc39f5d8 (patch)
tree191522aa88f9f845a9c27b1ddb86116b87033c4b /src/modules/button
parentbe50a70bfd8b3f3daf0c3351fdce6e2fea515bd7 (diff)
minor code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@7820 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/button')
-rw-r--r--src/modules/button/button.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/button/button.cpp b/src/modules/button/button.cpp
index 437f24f925..b79a0386c8 100644
--- a/src/modules/button/button.cpp
+++ b/src/modules/button/button.cpp
@@ -94,7 +94,7 @@ static int TBStateConvert2Flat(int state)
static void PaintWorker(MButtonCtrl *ctl, HDC hdcPaint)
{
- if ( !hdcPaint)
+ if (!hdcPaint)
return;
RECT rcClient;
@@ -222,7 +222,7 @@ static void PaintWorker(MButtonCtrl *ctl, HDC hdcPaint)
sz.cx -= szHot.cx;
}
if (ctl->arrow)
- DrawState(hdcMem, NULL, NULL, (LPARAM)ctl->arrow, 0, rcClient.right-rcClient.left-5-GetSystemMetrics(SM_CXSMICON)+( !ctl->hThemeButton && ctl->stateId == PBS_PRESSED?1:0), (rcClient.bottom-rcClient.top)/2-GetSystemMetrics(SM_CYSMICON)/2+(!ctl->hThemeButton && ctl->stateId == PBS_PRESSED?1:0), GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), IsWindowEnabled(ctl->hwnd)?DST_ICON:DST_ICON|DSS_DISABLED);
+ DrawState(hdcMem, NULL, NULL, (LPARAM)ctl->arrow, 0, rcClient.right-rcClient.left-5-GetSystemMetrics(SM_CXSMICON)+(!ctl->hThemeButton && ctl->stateId == PBS_PRESSED?1:0), (rcClient.bottom-rcClient.top)/2-GetSystemMetrics(SM_CYSMICON)/2+(!ctl->hThemeButton && ctl->stateId == PBS_PRESSED?1:0), GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), IsWindowEnabled(ctl->hwnd)?DST_ICON:DST_ICON|DSS_DISABLED);
SelectObject(hdcMem, ctl->hFont);
DrawState(hdcMem, NULL, NULL, (LPARAM)szText, 0,
@@ -406,7 +406,7 @@ static LRESULT CALLBACK MButtonWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
else return 0;
case BM_SETCHECK:
- if ( !bct->bIsPushBtn) break;
+ if (!bct->bIsPushBtn) break;
if (wParam == BST_CHECKED) {
bct->bIsPushed = 1;
bct->stateId = PBS_PRESSED;
@@ -425,7 +425,7 @@ static LRESULT CALLBACK MButtonWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
case BUTTONSETARROW: // turn arrow on/off
if (wParam) {
- if ( !bct->arrow) {
+ if (!bct->arrow) {
bct->arrow = LoadSkinIcon(SKINICON_OTHER_DOWNARROW);
SetHwndPropInt(bct, OBJID_CLIENT, CHILDID_SELF, PROPID_ACC_ROLE, ROLE_SYSTEM_BUTTONDROPDOWN);
}
@@ -463,7 +463,7 @@ static LRESULT CALLBACK MButtonWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
case BUTTONADDTOOLTIP:
if (wParam) {
- if ( !bct->hwndToolTips) {
+ if (!bct->hwndToolTips) {
TTooltips tt;
tt.ThreadId = GetCurrentThreadId();
@@ -588,7 +588,7 @@ static LRESULT CALLBACK MButtonWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
POINT pt;
GetCursorPos(&pt);
- if ( !PtInRect(&rc, pt)) { // mouse must be gone, trigger mouse leave
+ if (!PtInRect(&rc, pt)) { // mouse must be gone, trigger mouse leave
PostMessage(hwnd, WM_MOUSELEAVE, 0, 0L);
KillTimer(hwnd, BUTTON_POLLID);
} }