summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/sidebar.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2015-03-05 22:14:09 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2015-03-05 22:14:09 +0000
commit18a91339f2d9e1449887f5d993ab2f038ff56833 (patch)
treec5ee079c530794040fee8d2cfb497bd799545735 /plugins/TabSRMM/src/sidebar.cpp
parentb915069a9d7ad8d4da5da7a7d92d3e73a0a65346 (diff)
TabSRMM: code cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@12344 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src/sidebar.cpp')
-rw-r--r--plugins/TabSRMM/src/sidebar.cpp11
1 files changed, 2 insertions, 9 deletions
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<TContainerData *>(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<RECT *>(rc), hdc);
CSkin::DrawItem(hdc, rc, skinItem);