diff options
author | George Hazan <ghazan@miranda.im> | 2022-06-15 19:56:57 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-06-15 19:56:57 +0300 |
commit | aad720ed16008739c07ae7a34b8d52d005958508 (patch) | |
tree | a985d479041f20b2da3abce7f207f5138a4fb09a | |
parent | 0513f6b6a0f751f05f086bd82b5d4222b796a13b (diff) |
StdMsg: resizer code fix
-rw-r--r-- | src/core/stdmsg/res/resource.rc | 3 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgdialog.cpp | 27 |
2 files changed, 13 insertions, 17 deletions
diff --git a/src/core/stdmsg/res/resource.rc b/src/core/stdmsg/res/resource.rc index 16e071fb55..9611fdc9be 100644 --- a/src/core/stdmsg/res/resource.rc +++ b/src/core/stdmsg/res/resource.rc @@ -84,9 +84,8 @@ STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_CLIPCHILDREN EXSTYLE WS_EX_CONTROLPARENT
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
- CONTROL "",IDC_SRMM_MESSAGE,"RichEdit50W",WS_VSCROLL | WS_TABSTOP | 0x1144,2,111,208,29,WS_EX_ACCEPTFILES | WS_EX_STATICEDGE
+ CONTROL "",IDC_SRMM_MESSAGE,"RichEdit50W",WS_VSCROLL | WS_TABSTOP | 0x1144,1,111,208,29,WS_EX_ACCEPTFILES | WS_EX_STATICEDGE
DEFPUSHBUTTON "&Send",IDOK,212,111,39,29
- PUSHBUTTON "Close",IDCANCEL,197,0,54,15,NOT WS_VISIBLE
CONTROL "",IDC_SRMM_LOG,"RichEdit50W",WS_VSCROLL | WS_TABSTOP | 0x844,1,16,250,91,WS_EX_STATICEDGE
CONTROL "",IDC_SPLITTERX,"Static",SS_ENHMETAFILE,172,23,10,73
CONTROL "",IDC_SPLITTERY,"Static",SS_ENHMETAFILE,0,108,251,2
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index a01dee62e3..b5012f797d 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -463,15 +463,16 @@ void CMsgDialog::OnType(CTimer*) int CMsgDialog::Resizer(UTILRESIZECONTROL *urc)
{
+ bool bToolbar = g_plugin.bShowButtons;
+ bool bSend = g_plugin.bSendButton;
+
if (isChat()) {
- bool bToolbar = g_plugin.bShowButtons;
- bool bSend = g_plugin.bSendButton;
bool bNick = m_si->iType != GCW_SERVER && m_bNicklistEnabled;
switch (urc->wId) {
case IDOK:
- urc->rcItem.left = bSend ? 315 : urc->dlgNewSize.cx;
- urc->rcItem.top = urc->dlgNewSize.cy - m_iSplitterY + 23;
+ urc->rcItem.left = bSend ? urc->dlgNewSize.cx - 64 + 2 : urc->dlgNewSize.cx;
+ urc->rcItem.top = urc->dlgNewSize.cy - m_iSplitterY + 28;
urc->rcItem.bottom = urc->dlgNewSize.cy - 1;
return RD_ANCHORX_RIGHT | RD_ANCHORY_CUSTOM;
@@ -510,7 +511,7 @@ LBL_CalcBottom: case IDC_SRMM_MESSAGE:
urc->rcItem.right = bSend ? urc->dlgNewSize.cx - 64 : urc->dlgNewSize.cx;
- urc->rcItem.top = urc->dlgNewSize.cy - m_iSplitterY + 22;
+ urc->rcItem.top = urc->dlgNewSize.cy - m_iSplitterY + 28;
urc->rcItem.bottom = urc->dlgNewSize.cy - 1;
return RD_ANCHORX_LEFT | RD_ANCHORY_CUSTOM;
}
@@ -530,7 +531,7 @@ LBL_CalcBottom: return RD_ANCHORX_WIDTH | RD_ANCHORY_CUSTOM;
case IDC_SRMM_MESSAGE:
- urc->rcItem.right = (g_plugin.bSendButton) ? urc->dlgNewSize.cx - 64 : urc->dlgNewSize.cx;
+ urc->rcItem.right = bSend ? urc->dlgNewSize.cx - 64 : urc->dlgNewSize.cx - 1;
if (g_plugin.bShowAvatar && m_avatarPic)
urc->rcItem.left = m_avatarWidth + 4;
@@ -538,11 +539,12 @@ LBL_CalcBottom: urc->rcItem.bottom = urc->dlgNewSize.cy - 1;
return RD_ANCHORX_CUSTOM | RD_ANCHORY_CUSTOM;
- case IDCANCEL:
case IDOK:
+ urc->rcItem.left = bSend ? urc->dlgNewSize.cx - 64 + 2 : urc->dlgNewSize.cx - 1;
+ urc->rcItem.right = urc->dlgNewSize.cx - 1;
urc->rcItem.top = urc->dlgNewSize.cy - m_iSplitterY + 3;
urc->rcItem.bottom = urc->dlgNewSize.cy - 1;
- return RD_ANCHORX_RIGHT | RD_ANCHORY_CUSTOM;
+ return RD_ANCHORX_CUSTOM | RD_ANCHORY_CUSTOM;
case IDC_AVATAR:
urc->rcItem.top = urc->rcItem.bottom - (m_avatarHeight + 2);
@@ -610,13 +612,9 @@ INT_PTR CMsgDialog::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_SIZE:
if (!IsIconic(m_hwnd)) {
-
if (isChat()) {
- bool bSend = g_plugin.bSendButton;
- bool bNick = m_si->iType != GCW_SERVER && m_bNicklistEnabled;
-
- m_btnOk.Show(bSend);
- m_splitterX.Show(bNick);
+ m_btnOk.Show(g_plugin.bSendButton);
+ m_splitterX.Show(m_si->iType != GCW_SERVER && m_bNicklistEnabled);
if (m_si->iType != GCW_SERVER)
m_nickList.Show(m_bNicklistEnabled);
else
@@ -1287,7 +1285,6 @@ void CMsgDialog::OnOptionsApplied(bool bUpdateAvatar) ShowWindow(hwndButton, (bShow) ? SW_SHOW : SW_HIDE);
}
- ShowWindow(GetDlgItem(m_hwnd, IDCANCEL), SW_HIDE);
m_splitterY.Show();
m_btnOk.Show(g_plugin.bSendButton);
|