From 108d14c63ec8e15ba6752abf3d1371db0749c703 Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Tue, 28 Aug 2012 20:32:00 +0200 Subject: [PATCH] Make sure the splitter is exactly in the middle Signed-off-by: Sven Strickroth --- src/TortoiseIDiff/MainWindow.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/TortoiseIDiff/MainWindow.cpp b/src/TortoiseIDiff/MainWindow.cpp index e829c9ce6..c7cddf217 100644 --- a/src/TortoiseIDiff/MainWindow.cpp +++ b/src/TortoiseIDiff/MainWindow.cpp @@ -129,7 +129,7 @@ LRESULT CALLBACK CMainWindow::WinMsgHandler(HWND hwnd, UINT uMsg, WPARAM wParam, // center the splitter RECT rect; GetClientRect(hwnd, &rect); - nSplitterPos = (rect.right-rect.left-SPLITTER_BORDER)/2; + nSplitterPos = (rect.right-rect.left)/2; CreateToolbar(); PositionChildren(&rect); picWindow1.FitImageInWindow(); @@ -171,10 +171,10 @@ LRESULT CALLBACK CMainWindow::WinMsgHandler(HWND hwnd, UINT uMsg, WPARAM wParam, RECT tbRect; GetWindowRect(hwndTB, &tbRect); LONG tbHeight = tbRect.bottom-tbRect.top-1; - nSplitterPos = (rect.bottom-rect.top-SPLITTER_BORDER+tbHeight)/2; + nSplitterPos = (rect.bottom-rect.top+tbHeight)/2; } else - nSplitterPos = (rect.right-rect.left-SPLITTER_BORDER)/2; + nSplitterPos = (rect.right-rect.left)/2; PositionChildren(&rect); } break; @@ -542,11 +542,11 @@ LRESULT CMainWindow::DoCommand(int id) RECT tbRect; GetWindowRect(hwndTB, &tbRect); LONG tbHeight = tbRect.bottom-tbRect.top-1; - nSplitterPos = (rect.bottom-rect.top-SPLITTER_BORDER+tbHeight)/2; + nSplitterPos = (rect.bottom-rect.top+tbHeight)/2; } else { - nSplitterPos = (rect.right-rect.left-SPLITTER_BORDER)/2; + nSplitterPos = (rect.right-rect.left)/2; } HMENU hMenu = GetMenu(*this); UINT uCheck = MF_BYCOMMAND; -- 2.11.4.GIT