From 18a91339f2d9e1449887f5d993ab2f038ff56833 Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Thu, 5 Mar 2015 22:14:09 +0000 Subject: TabSRMM: code cleanup git-svn-id: http://svn.miranda-ng.org/main/trunk@12344 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TabSRMM/src/sidebar.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'plugins/TabSRMM/src/sidebar.cpp') diff --git a/plugins/TabSRMM/src/sidebar.cpp b/plugins/TabSRMM/src/sidebar.cpp index 6ac9628f17..01cf0661bc 100644 --- a/plugins/TabSRMM/src/sidebar.cpp +++ b/plugins/TabSRMM/src/sidebar.cpp @@ -384,7 +384,7 @@ void CSideBar::Init() m_totalItemHeight = 0; m_uLayout = (m_pContainer->dwFlagsEx & 0xff000000) >> 24; - m_uLayout = ((m_uLayout >= 0 && m_uLayout < NR_LAYOUTS) ? m_uLayout : 0); + m_uLayout = ((m_uLayout < NR_LAYOUTS) ? m_uLayout : 0); m_currentLayout = &m_layouts[m_uLayout]; @@ -971,14 +971,7 @@ void __fastcall CSideBar::m_DefaultBackgroundRenderer(const HDC hdc, const RECT TContainerData *pContainer = const_cast(item->m_sideBar->getContainer()); int id = stateId == PBS_PRESSED || fIsActiveItem ? ID_EXTBKBUTTONSPRESSED : (stateId == PBS_HOT ? ID_EXTBKBUTTONSMOUSEOVER : ID_EXTBKBUTTONSNPRESSED); CSkinItem *skinItem = &SkinItems[id]; - HWND hwnd; - - if (id == IDC_SIDEBARUP) - hwnd = item->m_sideBar->getScrollUp()->m_buttonControl->hwnd; - else if (id == IDC_SIDEBARDOWN) - hwnd = item->m_sideBar->getScrollDown()->m_buttonControl->hwnd; - else - hwnd = item->m_buttonControl->hwnd; + HWND hwnd = item->m_buttonControl->hwnd; CSkin::SkinDrawBG(hwnd, pContainer->hwnd, pContainer, const_cast(rc), hdc); CSkin::DrawItem(hdc, rc, skinItem); -- cgit v1.2.3