[RAPPS] Calculate download listview position (#5232)

Correctly display Download ListView at right position in any languages. CORE-18706
This commit is contained in:
Katayama Hirofumi MZ 2023-04-09 05:51:23 +09:00 committed by GitHub
parent efe7368c46
commit fc5311aaf2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;