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/msgdialog.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'plugins/Scriver/src/msgdialog.cpp') diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index b40546ee8a..8767b67984 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -445,7 +445,8 @@ static void SubclassLogEdit(HWND hwnd) static void MessageDialogResize(HWND hwndDlg, SrmmWindowData *dat, int w, int h) { ParentWindowData *pdat = dat->parent; - int hSplitterPos = dat->splitterPos, toolbarHeight = dat->toolbarSize.cy; + bool bToolbar = (pdat->flags2 & SMF2_SHOWTOOLBAR) != 0; + int hSplitterPos = dat->splitterPos, toolbarHeight = (bToolbar) ? dat->toolbarSize.cy : 0; int hSplitterMinTop = toolbarHeight + dat->minLogBoxHeight, hSplitterMinBottom = dat->minEditBoxHeight; int infobarInnerHeight = INFO_BAR_INNER_HEIGHT; int infobarHeight = INFO_BAR_HEIGHT; @@ -510,7 +511,7 @@ static void MessageDialogResize(HWND hwndDlg, SrmmWindowData *dat, int w, int h) hdwp = DeferWindowPos(hdwp, GetDlgItem(hwndDlg, IDC_SPLITTERY), 0, 0, h - hSplitterPos - 1, toolbarWidth, SPLITTER_HEIGHT, SWP_NOZORDER); EndDeferWindowPos(hdwp); - SetButtonsPos(hwndDlg); + SetButtonsPos(hwndDlg, bToolbar); if (dat->hwndLog != NULL) { IEVIEWWINDOW ieWindow = { sizeof(ieWindow) }; -- cgit v1.2.3