diff options
author | George Hazan <ghazan@miranda.im> | 2023-03-22 20:28:56 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2023-03-22 20:28:56 +0300 |
commit | 6e97fc04aa23723077c138b7cb028a5a8793ddf6 (patch) | |
tree | 95a62c2f2c1f8314e389560cec5a504c2d08f5c3 /plugins/Scriver/src/msgdialog.cpp | |
parent | 0ff53148fe18ad476e47eae46e7ed6f3a8b56886 (diff) |
common nick list drawing code removed from DlgProc()
Diffstat (limited to 'plugins/Scriver/src/msgdialog.cpp')
-rw-r--r-- | plugins/Scriver/src/msgdialog.cpp | 44 |
1 files changed, 1 insertions, 43 deletions
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index 90a248965b..d918961932 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -1240,50 +1240,8 @@ INT_PTR CMsgDialog::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) DeleteDC(hdcMem);
return TRUE;
}
-
- if (dis->CtlID == IDC_SRMM_NICKLIST) {
- int index = dis->itemID;
- USERINFO *ui = g_chatApi.SM_GetUserFromIndex(m_si->ptszID, m_si->pszModule, index);
- if (ui) {
- int x_offset = 2;
-
- int height = dis->rcItem.bottom - dis->rcItem.top;
- if (height & 1)
- height++;
-
- int offset = (height == 10) ? 0 : height / 2 - 5;
- HFONT hFont = (ui->iStatusEx == 0) ? g_Settings.UserListFont : g_Settings.UserListHeadingsFont;
- HFONT hOldFont = (HFONT)SelectObject(dis->hDC, hFont);
- SetBkMode(dis->hDC, TRANSPARENT);
-
- if (dis->itemAction == ODA_FOCUS && dis->itemState & ODS_SELECTED)
- FillRect(dis->hDC, &dis->rcItem, g_chatApi.hListSelectedBkgBrush);
- else //if (dis->itemState & ODS_INACTIVE)
- FillRect(dis->hDC, &dis->rcItem, g_chatApi.hListBkgBrush);
-
- if (g_Settings.bShowContactStatus && g_Settings.bContactStatusFirst && ui->ContactStatus) {
- HICON hIcon = Skin_LoadProtoIcon(m_si->pszModule, ui->ContactStatus);
- DrawIconEx(dis->hDC, x_offset, dis->rcItem.top + offset - 3, hIcon, 16, 16, 0, nullptr, DI_NORMAL);
- IcoLib_ReleaseIcon(hIcon);
- x_offset += 18;
- }
- DrawIconEx(dis->hDC, x_offset, dis->rcItem.top + offset, g_chatApi.SM_GetStatusIcon(m_si, ui), 10, 10, 0, nullptr, DI_NORMAL);
- x_offset += 12;
- if (g_Settings.bShowContactStatus && !g_Settings.bContactStatusFirst && ui->ContactStatus) {
- HICON hIcon = Skin_LoadProtoIcon(m_si->pszModule, ui->ContactStatus);
- DrawIconEx(dis->hDC, x_offset, dis->rcItem.top + offset - 3, hIcon, 16, 16, 0, nullptr, DI_NORMAL);
- IcoLib_ReleaseIcon(hIcon);
- x_offset += 18;
- }
-
- SetTextColor(dis->hDC, ui->iStatusEx == 0 ? g_Settings.crUserListColor : g_Settings.crUserListHeadingsColor);
- TextOut(dis->hDC, dis->rcItem.left + x_offset, dis->rcItem.top, ui->pszNick, (int)mir_wstrlen(ui->pszNick));
- SelectObject(dis->hDC, hOldFont);
- }
- return TRUE;
- }
}
- return Menu_DrawItem(lParam);
+ break;
case WM_COMMAND:
switch (LOWORD(wParam)) {
|