summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/msgdialog.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-08-06 16:53:21 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-08-06 16:53:21 +0000
commit4b18be723f69770d5c1acb9989e4451d76fcd229 (patch)
tree9a84917670811c035649b07001c9f02a4bd1ad53 /plugins/TabSRMM/src/msgdialog.cpp
parentae9f4095f3470845057c8d64498710fd6202612b (diff)
- 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
Diffstat (limited to 'plugins/TabSRMM/src/msgdialog.cpp')
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp19
1 files changed, 8 insertions, 11 deletions
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;