summaryrefslogtreecommitdiff
path: root/plugins/Scriver/src/tabs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Scriver/src/tabs.cpp')
-rw-r--r--plugins/Scriver/src/tabs.cpp33
1 files changed, 8 insertions, 25 deletions
diff --git a/plugins/Scriver/src/tabs.cpp b/plugins/Scriver/src/tabs.cpp
index e6fb6a798a..dbeabcd992 100644
--- a/plugins/Scriver/src/tabs.cpp
+++ b/plugins/Scriver/src/tabs.cpp
@@ -795,6 +795,7 @@ static INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wPara
MoveWindow(dat->m_hwndActive, dat->childRect.left, dat->childRect.top, dat->childRect.right - dat->childRect.left, dat->childRect.bottom - dat->childRect.top, TRUE);
else {
RECT rcStatus, rcChild, rcWindow, rc;
+ SIZE size;
dat->bMinimized = 0;
GetClientRect(hwndDlg, &rc);
GetWindowRect(hwndDlg, &rcWindow);
@@ -805,20 +806,18 @@ static INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wPara
}
MoveWindow(dat->m_hwndTabs, 0, 2, (rc.right - rc.left), (rc.bottom - rc.top) - (rcStatus.bottom - rcStatus.top) - 2, FALSE);
RedrawWindow(dat->m_hwndTabs, nullptr, nullptr, RDW_INVALIDATE | RDW_FRAME | RDW_ERASE);
-
- SIZE size;
GetMinimunWindowSize(dat, &size);
if ((rcWindow.bottom - rcWindow.top) < size.cy || (rcWindow.right - rcWindow.left) < size.cx) {
- SetTimer(hwndDlg, TIMERID_RESIZE, 50, nullptr);
- break;
+ if ((rcWindow.bottom - rcWindow.top) < size.cy)
+ rcWindow.bottom = rcWindow.top + size.cy;
+ if ((rcWindow.right - rcWindow.left) < size.cx)
+ rcWindow.right = rcWindow.left + size.cx;
+ MoveWindow(hwndDlg, rcWindow.left, rcWindow.top, rcWindow.right - rcWindow.left, rcWindow.bottom - rcWindow.top, TRUE);
}
-
dat->GetChildWindowRect(&rcChild);
dat->childRect = rcChild;
- if (dat->m_hwndActive) {
- MoveWindow(dat->m_hwndActive, rcChild.left, rcChild.top, rcChild.right - rcChild.left, rcChild.bottom - rcChild.top, TRUE);
- RedrawWindow(GetDlgItem(dat->m_hwndActive, IDC_SRMM_LOG), nullptr, nullptr, RDW_INVALIDATE);
- }
+ MoveWindow(dat->m_hwndActive, rcChild.left, rcChild.top, rcChild.right - rcChild.left, rcChild.bottom - rcChild.top, TRUE);
+ RedrawWindow(GetDlgItem(dat->m_hwndActive, IDC_SRMM_LOG), nullptr, nullptr, RDW_INVALIDATE);
if (dat->flags2.bShowStatusBar) {
SendMessage(dat->m_hwndStatus, WM_SIZE, 0, 0);
RedrawWindow(dat->m_hwndStatus, nullptr, nullptr, RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE);
@@ -951,22 +950,6 @@ static INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wPara
FlashWindow(hwndDlg, FALSE);
}
}
- if (wParam == TIMERID_RESIZE) {
- KillTimer(hwndDlg, TIMERID_RESIZE);
-
- RECT rcWindow;
- GetWindowRect(hwndDlg, &rcWindow);
-
- SIZE size;
- GetMinimunWindowSize(dat, &size);
- if ((rcWindow.bottom - rcWindow.top) < size.cy || (rcWindow.right - rcWindow.left) < size.cx) {
- if ((rcWindow.bottom - rcWindow.top) < size.cy)
- rcWindow.bottom = rcWindow.top + size.cy;
- if ((rcWindow.right - rcWindow.left) < size.cx)
- rcWindow.right = rcWindow.left + size.cx;
- MoveWindow(hwndDlg, rcWindow.left, rcWindow.top, rcWindow.right - rcWindow.left, rcWindow.bottom - rcWindow.top, TRUE);
- }
- }
break;
case WM_CONTEXTMENU: