summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorslotwin <slotwin@users.noreply.github.com>2014-05-12 14:49:56 +0000
committerslotwin <slotwin@users.noreply.github.com>2014-05-12 14:49:56 +0000
commit3a445410b69f9ee90b5a990237012ae71e35aaca (patch)
tree773a1a793ec50cba75dac7cd4b81801cd212ff24
parentd034f8ba7148f9ea4b8a65ca0615e543d69655b6 (diff)
fix for clist_modern toptoolbar toggle buttons
git-svn-id: http://svn.miranda-ng.org/main/trunk@9175 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/Clist_modern/src/modern_tbbutton.cpp9
-rw-r--r--plugins/Clist_modern/src/modern_toolbar.cpp2
2 files changed, 9 insertions, 2 deletions
diff --git a/plugins/Clist_modern/src/modern_tbbutton.cpp b/plugins/Clist_modern/src/modern_tbbutton.cpp
index d22cf76aab..2825a8259d 100644
--- a/plugins/Clist_modern/src/modern_tbbutton.cpp
+++ b/plugins/Clist_modern/src/modern_tbbutton.cpp
@@ -289,6 +289,15 @@ static LRESULT CALLBACK ToolbarButtonProc(HWND hwndDlg, UINT msg, WPARAM wParam
}
break;
+ case WM_MOUSELEAVE:
+ case BUTTONSETASPUSHBTN:
+ return 0;
+
+ case WM_ENABLE: // windows tells us to enable/disable
+ bct->stateId = wParam ? PBS_NORMAL : PBS_DISABLED;
+ InvalidateParentRect(bct->hwnd, NULL, TRUE);
+ return 0;
+
case WM_LBUTTONDOWN:
{
POINT ptMouse = UNPACK_POINT(lParam);
diff --git a/plugins/Clist_modern/src/modern_toolbar.cpp b/plugins/Clist_modern/src/modern_toolbar.cpp
index 787a6c06a7..b6b6c3a38b 100644
--- a/plugins/Clist_modern/src/modern_toolbar.cpp
+++ b/plugins/Clist_modern/src/modern_toolbar.cpp
@@ -76,8 +76,6 @@ void Modern_InitButtons()
else tbb.hIconHandleUp = RegisterIcolibIconHandle(buf, "Toolbar", BTNS[i].pszTooltipUp, NULL, 0, NULL, SKINICON_OTHER_MAINMENU);
if (BTNS[i].pszTooltipDn) {
- tbb.dwFlags |= TTBBF_ASPUSHBUTTON;
-
mir_snprintf(buf,SIZEOF(buf),"%s%s%s", TTB_OPTDIR, BTNS[i].pszButtonID, "_up");
tbb.hIconHandleDn = RegisterIcolibIconHandle(buf, "Toolbar", BTNS[i].pszTooltipDn, _T("icons\\toolbar_icons.dll"), BTNS[i].icoDefIdx+1, g_hInst, BTNS[i].defResource2 );
}