From 6cdf2af0e28710a64d917d981dc8f3fae1bade08 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 8 Dec 2016 18:04:28 +0300 Subject: Scriver: fix for a broken toolbar visibility control --- plugins/Scriver/src/chat/window.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/Scriver/src/chat') diff --git a/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp index b5cf1340f4..c7e8ce8c4a 100644 --- a/plugins/Scriver/src/chat/window.cpp +++ b/plugins/Scriver/src/chat/window.cpp @@ -81,10 +81,10 @@ static void InitButtons(HWND hwndDlg, SESSION_INFO *si) static void MessageDialogResize(HWND hwndDlg, SESSION_INFO *si, int w, int h) { int logBottom, toolbarTopY; - BOOL bNick = si->iType != GCW_SERVER && si->bNicklistEnabled; - BOOL bToolbar = SendMessage(GetParent(hwndDlg), CM_GETTOOLBARSTATUS, 0, 0); + bool bNick = si->iType != GCW_SERVER && si->bNicklistEnabled; + bool bToolbar = SendMessage(GetParent(hwndDlg), CM_GETTOOLBARSTATUS, 0, 0) != 0; int hSplitterMinTop = TOOLBAR_HEIGHT + si->minLogBoxHeight, hSplitterMinBottom = si->minEditBoxHeight; - int toolbarHeight = TOOLBAR_HEIGHT; + int toolbarHeight = bToolbar ? TOOLBAR_HEIGHT : 0; si->iSplitterY = si->desiredInputAreaHeight + SPLITTER_HEIGHT + 3; @@ -125,7 +125,7 @@ static void MessageDialogResize(HWND hwndDlg, SESSION_INFO *si, int w, int h) hdwp = DeferWindowPos(hdwp, GetDlgItem(hwndDlg, IDC_MESSAGE), 0, 1, h - si->iSplitterY + SPLITTER_HEIGHT, w - 2, si->iSplitterY - SPLITTER_HEIGHT - 1, SWP_NOZORDER); EndDeferWindowPos(hdwp); - SetButtonsPos(hwndDlg); + SetButtonsPos(hwndDlg, bToolbar); if (si->hwndLog != NULL) { IEVIEWWINDOW ieWindow; -- cgit v1.2.3