summaryrefslogtreecommitdiff
path: root/src/core/stdmsg
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-02-16 17:23:59 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-02-16 17:23:59 +0300
commit58896c67fdc310f5501990afd758da23ff64d3c0 (patch)
treeb54a2fb79bf33f43e190337345c13538b1400dd0 /src/core/stdmsg
parent94e76a5c75a16273ac41fd1692d103b15b5dd092 (diff)
fixes #3033 ("Gap between buttons" option is broken)
Diffstat (limited to 'src/core/stdmsg')
-rw-r--r--src/core/stdmsg/src/globals.cpp1
-rw-r--r--src/core/stdmsg/src/globals.h1
-rw-r--r--src/core/stdmsg/src/msgs.cpp6
3 files changed, 3 insertions, 5 deletions
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<uint32_t> popupFlags;
CMOption<uint32_t> msgTimeout;
CMOption<uint32_t> nFlashMax;
- CMOption<uint8_t> iGap;
CMOption<uint8_t> iLoadHistory;
CMOption<uint16_t> 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;
}
}