https://git.reactos.org/?p=reactos.git;a=commitdiff;h=efbebf983cc1708eca691…
commit efbebf983cc1708eca69194fa6461d6d54622707
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Wed Oct 24 18:19:48 2018 +0900
Commit: GitHub <noreply(a)github.com>
CommitDate: Wed Oct 24 18:19:48 2018 +0900
[REGEDIT] Improve the layout of controls (#967)
The horizontal scroll bar of the listview was wrongly hidden.
CORE-15187
---
base/applications/regedit/childwnd.c | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/base/applications/regedit/childwnd.c b/base/applications/regedit/childwnd.c
index b1fb9fd0c5..e6511fc03f 100644
--- a/base/applications/regedit/childwnd.c
+++ b/base/applications/regedit/childwnd.c
@@ -42,7 +42,9 @@ extern void ResizeWnd(int cx, int cy)
{
HDWP hdwp = BeginDeferWindowPos(4);
RECT rt, rs, rb;
- const int tHeight = 22;
+ const int nButtonWidth = 44;
+ const int nButtonHeight = 22;
+ int cyEdge = GetSystemMetrics(SM_CYEDGE);
const UINT uFlags = SWP_NOZORDER | SWP_NOACTIVATE;
SetRect(&rt, 0, 0, cx, cy);
cy = 0;
@@ -56,22 +58,26 @@ extern void ResizeWnd(int cx, int cy)
if (hdwp)
hdwp = DeferWindowPos(hdwp, g_pChildWnd->hAddressBarWnd, NULL,
rt.left, rt.top,
- rt.right - rt.left - 2*tHeight, tHeight,
+ rt.right - rt.left - nButtonWidth, nButtonHeight,
uFlags);
if (hdwp)
hdwp = DeferWindowPos(hdwp, g_pChildWnd->hAddressBtnWnd, NULL,
- rt.right - 2*tHeight, rt.top,
- 2*tHeight, tHeight,
+ rt.right - nButtonWidth, rt.top,
+ nButtonWidth, nButtonHeight,
uFlags);
if (hdwp)
hdwp = DeferWindowPos(hdwp, g_pChildWnd->hTreeWnd, NULL,
- rt.left, rt.top + tHeight + 2,
- g_pChildWnd->nSplitPos - SPLIT_WIDTH/2 - rt.left,
rt.bottom - rt.top - cy,
+ rt.left,
+ rt.top + nButtonHeight + cyEdge,
+ g_pChildWnd->nSplitPos - SPLIT_WIDTH/2 - rt.left,
+ rt.bottom - rt.top - cy - 2 * cyEdge,
uFlags);
if (hdwp)
hdwp = DeferWindowPos(hdwp, g_pChildWnd->hListWnd, NULL,
- rt.left + cx, rt.top + tHeight + 2,
- rt.right - cx, rt.bottom - rt.top - cy,
+ rt.left + cx,
+ rt.top + nButtonHeight + cyEdge,
+ rt.right - cx,
+ rt.bottom - rt.top - cy - 2 * cyEdge,
uFlags);
if (hdwp)
EndDeferWindowPos(hdwp);