From 4b18be723f69770d5c1acb9989e4451d76fcd229 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 6 Aug 2014 16:53:21 +0000 Subject: - unused drawing code removed; - fixed some crazy nuances in the info panel avatar's resizer git-svn-id: http://svn.miranda-ng.org/main/trunk@10095 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/TabSRMM/src/msgdialog.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'plugins/TabSRMM/src/msgdialog.cpp') diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index b2660e4df5..e82389f857 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -1639,16 +1639,15 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP hbm = (m_pContainer->avatarMode == 3) ? dat->hOwnPic : (dat->ace ? dat->ace->hbmPic : PluginConfig.g_hbmUnknown); double dHeight = 0, dWidth = 0; - Utils::scaleAvatarHeightLimited(hbm, dWidth, dHeight, panelHeight); - - LONG panelAvatarWidth = dat->iPanelAvatarX = (int)dWidth; + Utils::scaleAvatarHeightLimited(hbm, dWidth, dHeight, panelHeight-2); + dat->iPanelAvatarX = (int)dWidth; dat->iPanelAvatarY = (int)dHeight; rc.top = 1; - rc.left = cx - (panelAvatarWidth > 0 ? panelAvatarWidth : panelHeight); - rc.bottom = rc.top + (panelHeight - 3); + rc.left = cx - dat->iPanelAvatarX; + rc.bottom = panelHeight - (CSkin::m_bAvatarBorderType ? 2 : 0); rc.right = cx; - rc.bottom--; + dat->rcPic = rc; if (dat->bShowInfoAvatar) { SetWindowPos(dat->hwndPanelPicParent, HWND_TOP, rc.left - 2, rc.top, rc.right - rc.left, (rc.bottom - rc.top) + 1, 0); @@ -1656,13 +1655,11 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP } else { ShowWindow(dat->hwndPanelPicParent, SW_HIDE); - panelAvatarWidth = dat->iPanelAvatarX = dat->iPanelAvatarY = 0; + dat->iPanelAvatarX = dat->iPanelAvatarY = 0; } - dat->rcPic = rc; - - rc.right = cx - panelAvatarWidth; - rc.left = cx - panelAvatarWidth - dat->panelStatusCX; + rc.right = cx - dat->iPanelAvatarX; + rc.left = rc.right - dat->panelStatusCX; rc.bottom = panelHeight - 3; rc.top = rc.bottom - dat->ipFieldHeight; dat->rcStatus = rc; -- cgit v1.2.3