diff options
author | George Hazan <ghazan@miranda.im> | 2016-12-18 13:05:24 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2016-12-18 13:05:24 +0300 |
commit | 9705b55d9b81bc6bcc475c4b2f7db9e33f89e037 (patch) | |
tree | b04a40d6dfc265023f254faa9493723c7b87e734 /plugins/TabSRMM/src | |
parent | 34d9db73c26ad24b1f8bf1e5a1949c407c9639ca (diff) |
- two unused variables removed;
- second splitter's position altered to place a smiley button correctly
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r-- | plugins/TabSRMM/src/TSButton.cpp | 17 | ||||
-rw-r--r-- | plugins/TabSRMM/src/buttonsbar.cpp | 3 |
2 files changed, 8 insertions, 12 deletions
diff --git a/plugins/TabSRMM/src/TSButton.cpp b/plugins/TabSRMM/src/TSButton.cpp index 443039eba6..75d2897bfb 100644 --- a/plugins/TabSRMM/src/TSButton.cpp +++ b/plugins/TabSRMM/src/TSButton.cpp @@ -181,13 +181,12 @@ static void PaintWorker(TSButtonCtrl *ctl, HDC hdcPaint) }
else {
if (ctl->pContainer && CSkin::m_skinEnabled) {
- CSkinItem *item, *realItem = 0;
+ CSkinItem *item;
if (ctl->bTitleButton)
item = &SkinItems[ctl->stateId == PBS_NORMAL ? ID_EXTBKTITLEBUTTON : (ctl->stateId == PBS_HOT ? ID_EXTBKTITLEBUTTONMOUSEOVER : ID_EXTBKTITLEBUTTONPRESSED)];
- else {
+ else
item = &SkinItems[(ctl->stateId == PBS_NORMAL || ctl->stateId == PBS_DISABLED) ? ID_EXTBKBUTTONSNPRESSED : (ctl->stateId == PBS_HOT ? ID_EXTBKBUTTONSMOUSEOVER : ID_EXTBKBUTTONSPRESSED)];
- realItem = item;
- }
+
CSkin::SkinDrawBG(ctl->hwnd, ctl->pContainer->hwnd, ctl->pContainer, &rcClient, hdcMem);
if (!item->IGNORED) {
RECT rc1 = rcClient;
@@ -211,7 +210,7 @@ static void PaintWorker(TSButtonCtrl *ctl, HDC hdcPaint) else {
CSkin::m_switchBarItem->setAlphaFormat(AC_SRC_ALPHA, state == PBS_NORMAL ? 140 : 240);
if (state == PBS_PRESSED) {
- RECT rc = rcClient;
+ RECT rc = rcClient;
InflateRect(&rc, -1, -1);
HBRUSH bBack = CreateSolidBrush(PluginConfig.m_tbBackgroundLow ? PluginConfig.m_tbBackgroundLow : GetSysColor(COLOR_3DDKSHADOW));
FillRect(hdcMem, &rc, bBack);
@@ -229,9 +228,7 @@ static void PaintWorker(TSButtonCtrl *ctl, HDC hdcPaint) }
}
- /*
- * render content
- */
+ // render content
if (ctl->arrow) {
rcContent.top += 2;
rcContent.bottom -= 2;
@@ -442,7 +439,7 @@ static LRESULT CALLBACK TSButtonWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, L bct->stateId = PBS_PRESSED;
else if (LOWORD(lParam) > rc.right - 12) {
if (GetDlgCtrlID(hwndDlg) == IDOK || bct->stateId != PBS_DISABLED) {
- WORD w = (WORD)((INT_PTR)bct->arrow & 0x0000ffff);
+ WORD w = LOWORD((INT_PTR)bct->arrow);
SendMessage(GetParent(hwndDlg), WM_COMMAND, MAKELONG(w, BN_CLICKED), (LPARAM)hwndDlg);
}
}
@@ -481,8 +478,8 @@ static LRESULT CALLBACK TSButtonWndProc(HWND hwndDlg, UINT msg, WPARAM wParam, L case WM_TIMER: // use a timer to check if they have did a mouseout
if (wParam == BUTTON_POLLID) {
RECT rc;
- POINT pt;
GetWindowRect(hwndDlg, &rc);
+ POINT pt;
GetCursorPos(&pt);
if (!PtInRect(&rc, pt)) { // mouse must be gone, trigger mouse leave
PostMessage(hwndDlg, WM_MOUSELEAVE, 0, 0L);
diff --git a/plugins/TabSRMM/src/buttonsbar.cpp b/plugins/TabSRMM/src/buttonsbar.cpp index 4302a2cc05..1f3e24fde9 100644 --- a/plugins/TabSRMM/src/buttonsbar.cpp +++ b/plugins/TabSRMM/src/buttonsbar.cpp @@ -91,7 +91,7 @@ static int CB_InitDefaultButtons(WPARAM, LPARAM) bbd.bbbFlags = BBBF_ISCHATBUTTON | BBBF_ISDUMMYBUTTON; bbd.dwButtonID = 1; bbd.pszModuleName = "tb_splitter"; - bbd.dwDefPos = 31; + bbd.dwDefPos = 35; bbd.hIcon = 0; bbd.pwszTooltip = 0; Srmm_AddButton(&bbd); @@ -157,7 +157,6 @@ void BB_InitDlgButtons(TWindowData *dat) RECT rect; GetClientRect(hdlg, &rect); - int splitterY = ptSplitter.y - DPISCALEY_S(1); dat->bbLSideWidth = dat->bbRSideWidth = 0; |