From 33b8ce3659e703d5387efd7697676af223c225e9 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Tue, 6 Sep 2022 10:42:19 +0100 Subject: [PATCH] Windows: move the right control for align_next_to. We had carefully calculated, for each control in an aligned group, how much _that control_ should move downwards by. But then, because I carelessly referred to the wrong variable name, we actually moved the wrong one - not the control we'd just calculated the offset for, but always the _last_ one in the group, which was the one the top-level alignment code was processing at the point we began this loop. As a result, the dropdown list in the front-page protocol selector was hilariously misaligned. Now it's back where it should be. --- windows/controls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows/controls.c b/windows/controls.c index ae5a81fc..ce3638e4 100644 --- a/windows/controls.c +++ b/windows/controls.c @@ -1758,7 +1758,7 @@ void winctrl_layout(struct dlgparam *dp, struct winctrls *wc, continue; LONG dy = (mid2 - (rect.top + rect.bottom)) / 2; - move_windows(pos.hwnd, c->base_id, c->num_ids, dy); + move_windows(pos.hwnd, thisc->base_id, thisc->num_ids, dy); } } } else {