https://git.reactos.org/?p=reactos.git;a=commitdiff;h=27502f5c511893a6497460...
commit 27502f5c511893a6497460262f27e5b2f85fb194 Author: Serge Gautherie 32623169+SergeGautherie@users.noreply.github.com AuthorDate: Tue Nov 26 23:27:21 2019 +0100 Commit: Katayama Hirofumi MZ katayama.hirofumi.mz@gmail.com CommitDate: Wed Nov 27 07:27:21 2019 +0900
[COMCTL32] Minimize Wine diff (#2035)
Addendum to b931f643e35e6a23dbef99e785804039ea579b6a.
CORE-16466 --- dll/win32/comctl32/listview.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-)
diff --git a/dll/win32/comctl32/listview.c b/dll/win32/comctl32/listview.c index 7aa9c4c611c..ee2524faddf 100644 --- a/dll/win32/comctl32/listview.c +++ b/dll/win32/comctl32/listview.c @@ -2115,26 +2115,17 @@ static INT LISTVIEW_UpdateVScroll(LISTVIEW_INFO *infoPtr) ZeroMemory(&vertInfo, sizeof(SCROLLINFO)); vertInfo.cbSize = sizeof(SCROLLINFO); #ifdef __REACTOS__ /* CORE-16466 part 2 of 4 */ - vertInfo.nPage = max((infoPtr->rcList.bottom - infoPtr->rcList.top), 0); + vertInfo.nPage = max(0, infoPtr->rcList.bottom - infoPtr->rcList.top); #else vertInfo.nPage = infoPtr->rcList.bottom - infoPtr->rcList.top; #endif
if (infoPtr->uView == LV_VIEW_DETAILS) { -#ifdef __REACTOS__ /* CORE-16466 part 3 of 4 */ - if (vertInfo.nPage != 0) - { - vertInfo.nMax = infoPtr->nItemCount; - - /* scroll by at least one page */ - if (vertInfo.nPage < infoPtr->nItemHeight) - vertInfo.nPage = infoPtr->nItemHeight; - - if (infoPtr->nItemHeight > 0) - vertInfo.nPage /= infoPtr->nItemHeight; - } -#else +#ifdef __REACTOS__ /* CORE-16466 part 3a of 4 */ + if (vertInfo.nPage != 0) + { +#endif vertInfo.nMax = infoPtr->nItemCount; /* scroll by at least one page */ @@ -2143,6 +2134,8 @@ static INT LISTVIEW_UpdateVScroll(LISTVIEW_INFO *infoPtr)
if (infoPtr->nItemHeight > 0) vertInfo.nPage /= infoPtr->nItemHeight; +#ifdef __REACTOS__ /* CORE-16466 part 3b of 4 */ + } #endif } else if (infoPtr->uView != LV_VIEW_LIST) /* LV_VIEW_ICON, or LV_VIEW_SMALLICON */