https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fc5311aaf23ce688f8fd39...
commit fc5311aaf23ce688f8fd39b088bdeea445ef9ec4 Author: Katayama Hirofumi MZ katayama.hirofumi.mz@gmail.com AuthorDate: Sun Apr 9 05:51:23 2023 +0900 Commit: GitHub noreply@github.com CommitDate: Sun Apr 9 05:51:23 2023 +0900
[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;