From 58896c67fdc310f5501990afd758da23ff64d3c0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 16 Feb 2022 17:23:59 +0300 Subject: fixes #3033 ("Gap between buttons" option is broken) --- src/core/stdmsg/src/globals.cpp | 1 - src/core/stdmsg/src/globals.h | 1 - src/core/stdmsg/src/msgs.cpp | 6 +++--- 3 files changed, 3 insertions(+), 5 deletions(-) (limited to 'src/core/stdmsg') diff --git a/src/core/stdmsg/src/globals.cpp b/src/core/stdmsg/src/globals.cpp index 86ec29130a..a2d6e175fe 100644 --- a/src/core/stdmsg/src/globals.cpp +++ b/src/core/stdmsg/src/globals.cpp @@ -136,7 +136,6 @@ GlobalMessageData::GlobalMessageData() : popupFlags(SRMMMOD, "PopupFlags", 0), nFlashMax(SRMMMOD, "FlashMax", 5), - iGap(SRMSGMOD, "ButtonsBarGap", 1), msgTimeout(SRMMMOD, "MessageTimeout", 65000), diff --git a/src/core/stdmsg/src/globals.h b/src/core/stdmsg/src/globals.h index f44a4521b7..031357356b 100644 --- a/src/core/stdmsg/src/globals.h +++ b/src/core/stdmsg/src/globals.h @@ -60,7 +60,6 @@ struct GlobalMessageData CMOption popupFlags; CMOption msgTimeout; CMOption nFlashMax; - CMOption iGap; CMOption iLoadHistory; CMOption nLoadCount, nLoadTime; diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp index 1dc1bf4341..23f9bf5702 100644 --- a/src/core/stdmsg/src/msgs.cpp +++ b/src/core/stdmsg/src/msgs.cpp @@ -412,7 +412,7 @@ void SetButtonsPos(HWND hwndDlg, bool bIsChat) else yPos = 2; GetClientRect(hwndDlg, &rc); - int iLeftX = 2, iRightX = rc.right - 2; + int iLeftX = 2, iRightX = rc.right - 2, iGap = Srmm_GetButtonGap(); CustomButtonData *cbd; for (int i = 0; cbd = Srmm_GetNthButton(i); i++) { @@ -421,12 +421,12 @@ void SetButtonsPos(HWND hwndDlg, bool bIsChat) continue; if (cbd->m_bRSided) { - iRightX -= g_dat.iGap + cbd->m_iButtonWidth; + iRightX -= iGap + cbd->m_iButtonWidth; hdwp = DeferWindowPos(hdwp, hwndButton, nullptr, iRightX, yPos, 0, 0, SWP_NOZORDER | SWP_NOSIZE); } else { hdwp = DeferWindowPos(hdwp, hwndButton, nullptr, iLeftX, yPos, 0, 0, SWP_NOZORDER | SWP_NOSIZE); - iLeftX += g_dat.iGap + cbd->m_iButtonWidth; + iLeftX += iGap + cbd->m_iButtonWidth; } } -- cgit v1.2.3