Commit b2cb04b4 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

comctl32: Fix listview horizontal scrolling.

parent a87e726d
......@@ -9608,6 +9608,7 @@ static LRESULT LISTVIEW_HScroll(LISTVIEW_INFO *infoPtr, INT nScrollCode,
{
INT nOldScrollPos, nNewScrollPos;
SCROLLINFO scrollInfo;
BOOL is_an_icon;
TRACE("(nScrollCode=%d(%s), nScrollDiff=%d)\n", nScrollCode,
debugscrollcode(nScrollCode), nScrollDiff);
......@@ -9617,6 +9618,8 @@ static LRESULT LISTVIEW_HScroll(LISTVIEW_INFO *infoPtr, INT nScrollCode,
scrollInfo.cbSize = sizeof(SCROLLINFO);
scrollInfo.fMask = SIF_PAGE | SIF_POS | SIF_RANGE | SIF_TRACKPOS;
is_an_icon = ((infoPtr->uView == LV_VIEW_ICON) || (infoPtr->uView == LV_VIEW_SMALLICON));
if (!GetScrollInfo(infoPtr->hwndSelf, SB_HORZ, &scrollInfo)) return 1;
nOldScrollPos = scrollInfo.nPos;
......@@ -9627,11 +9630,11 @@ static LRESULT LISTVIEW_HScroll(LISTVIEW_INFO *infoPtr, INT nScrollCode,
break;
case SB_LINELEFT:
nScrollDiff = -1;
nScrollDiff = (is_an_icon) ? -LISTVIEW_SCROLL_ICON_LINE_SIZE : -1;
break;
case SB_LINERIGHT:
nScrollDiff = 1;
nScrollDiff = (is_an_icon) ? LISTVIEW_SCROLL_ICON_LINE_SIZE : 1;
break;
case SB_PAGELEFT:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment