From fc5311aaf23ce688f8fd39b088bdeea445ef9ec4 Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Sun, 9 Apr 2023 05:51:23 +0900 Subject: [PATCH] [RAPPS] Calculate download listview position (#5232) Correctly display Download ListView at right position in any languages. CORE-18706 --- base/applications/rapps/loaddlg.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/base/applications/rapps/loaddlg.cpp b/base/applications/rapps/loaddlg.cpp index 9063954ece0..d76e666e042 100644 --- a/base/applications/rapps/loaddlg.cpp +++ b/base/applications/rapps/loaddlg.cpp @@ -264,7 +264,12 @@ class CDowloadingAppsListView : public CListView HWND Create(HWND hwndParent) { - RECT r = {10, 150, 320, 350}; + RECT r; + ::GetClientRect(hwndParent, &r); + r.top = (2 * r.top + 1 * r.bottom) / 3; /* The vertical position at ratio 1 : 2 */ +#define MARGIN 10 + ::InflateRect(&r, -MARGIN, -MARGIN); + const DWORD style = WS_CHILD | WS_VISIBLE | LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_NOSORTHEADER | LVS_NOCOLUMNHEADER;