@@ -281,8 +281,11 @@ class CWebToolWindow : public IWebToolWindow, IWebDiffEventHandler
281
281
void OnSize (HWND hwnd, UINT nType, int cx, int cy)
282
282
{
283
283
static const int nIDs[] = {
284
- 0
285
- // IDC_ZOOM,
284
+ IDC_COMPARE,
285
+ IDC_ZOOM,
286
+ IDC_USERAGENT,
287
+ IDC_SYNC_EVENTS,
288
+ IDC_SHOWDIFFERENCES,
286
289
};
287
290
HDWP hdwp = BeginDeferWindowPos (static_cast <int >(std::size (nIDs)));
288
291
RECT rc;
@@ -294,8 +297,23 @@ class CWebToolWindow : public IWebToolWindow, IWebDiffEventHandler
294
297
GetWindowRect (hwndCtrl, &rcCtrl);
295
298
POINT pt = { rcCtrl.left , rcCtrl.top };
296
299
ScreenToClient (m_hWnd, &pt);
297
- DeferWindowPos (hdwp, hwndCtrl, nullptr , pt.x , pt.y , rc.right - pt.x * 2 , rcCtrl.bottom - rcCtrl.top , SWP_NOMOVE | SWP_NOZORDER);
300
+ DeferWindowPos (hdwp, hwndCtrl, nullptr , pt.x , pt.y , rc.right - pt.x - 2 , rcCtrl.bottom - rcCtrl.top , SWP_NOMOVE | SWP_NOZORDER);
298
301
}
302
+ RECT rcWidth, rcHeight, rcBy;
303
+ HWND hwndWidth = GetDlgItem (m_hWnd, IDC_WIDTH);
304
+ HWND hwndBy = GetDlgItem (m_hWnd, IDC_BY);
305
+ HWND hwndHeight = GetDlgItem (m_hWnd, IDC_HEIGHT);
306
+ GetWindowRect (hwndWidth, &rcWidth);
307
+ GetWindowRect (hwndBy, &rcBy);
308
+ GetWindowRect (hwndHeight, &rcHeight);
309
+ POINT ptWidth = { rcWidth.left , rcWidth.top };
310
+ ScreenToClient (m_hWnd, &ptWidth);
311
+ int wby = rcBy.right - rcBy.left ;
312
+ int w = (rc.right - 2 - ptWidth.x - wby - 4 ) / 2 ;
313
+ int h = rcWidth.bottom - rcWidth.top ;
314
+ DeferWindowPos (hdwp, hwndWidth, nullptr , ptWidth.x , ptWidth.y , w, h, SWP_NOMOVE | SWP_NOZORDER);
315
+ DeferWindowPos (hdwp, hwndBy, nullptr , ptWidth.x + w + 2 , ptWidth.y , rcBy.right - rcBy.left , h, SWP_NOZORDER);
316
+ DeferWindowPos (hdwp, hwndHeight, nullptr , ptWidth.x + w + 2 + wby + 2 , ptWidth.y , w, h, SWP_NOZORDER);
299
317
EndDeferWindowPos (hdwp);
300
318
301
319
Sync ();
0 commit comments