From e4ff24d8abc2af58b91585bc3ce221214d5a148b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 10 Jul 2012 17:54:52 +0000 Subject: fixes for Clist Modern's skinned toolbar git-svn-id: http://svn.miranda-ng.org/main/trunk@890 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_modern/modern_toolbar.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'plugins/Clist_modern/modern_toolbar.cpp') diff --git a/plugins/Clist_modern/modern_toolbar.cpp b/plugins/Clist_modern/modern_toolbar.cpp index fa729cb150..f62aa8dcb3 100644 --- a/plugins/Clist_modern/modern_toolbar.cpp +++ b/plugins/Clist_modern/modern_toolbar.cpp @@ -55,7 +55,7 @@ static int Modern_InitButtons(WPARAM, LPARAM) TTBButton tbb = { 0 }; tbb.cbSize = sizeof(tbb); - for (int i=0; i < SIZEOF(BTNS); i++ ) { + for (int i=0; i < SIZEOF(BTNS); i++) { tbb.dwFlags = TTBBF_ICONBYHANDLE; if (BTNS[i].pszButtonID) { tbb.name = BTNS[i].pszButtonID; @@ -162,27 +162,24 @@ static int ehhToolBarBackgroundSettingsChanged(WPARAM wParam, LPARAM lParam) static BOOL sttDrawToolBarBackground(HWND hwnd, HDC hdc, RECT * rect, ModernToolbarCtrl* pMTBInfo) { BOOL bFloat = (GetParent(hwnd)!=pcli->hwndContactList); - if (g_CluiData.fDisableSkinEngine || !g_CluiData.fLayered || bFloat) - { - RECT rc; + if (g_CluiData.fDisableSkinEngine || !g_CluiData.fLayered || bFloat) { HBRUSH hbr; + RECT rc; if (rect) rc=*rect; else GetClientRect(hwnd,&rc); - if ( !(tbdat.mtb_backgroundBmpUse && tbdat.mtb_hBmpBackground) && tbdat.mtb_useWinColors) - { + if ( !(tbdat.mtb_backgroundBmpUse && tbdat.mtb_hBmpBackground) && tbdat.mtb_useWinColors) { if (xpt_IsThemed(pMTBInfo->mtbXPTheme)) - xpt_DrawTheme(pMTBInfo->mtbXPTheme,pMTBInfo->hWnd, hdc, 0, 0, &rc, &rc); + xpt_DrawTheme(pMTBInfo->mtbXPTheme, pMTBInfo->hWnd, hdc, 0, 0, &rc, &rc); else { hbr = GetSysColorBrush(COLOR_3DFACE); FillRect(hdc, &rc, hbr); } } - else if (!tbdat.mtb_hBmpBackground && !tbdat.mtb_useWinColors) - { + else if (!tbdat.mtb_hBmpBackground && !tbdat.mtb_useWinColors) { hbr = CreateSolidBrush(tbdat.mtb_bkColour); FillRect(hdc, &rc, hbr); DeleteObject(hbr); -- cgit v1.2.3