From 6c76da02a883c5956cd5f2cf87ac107b5c207f26 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 18 Oct 2023 19:08:04 +0300 Subject: minor fix for scrollbar tracking --- plugins/NewStory/src/history_control.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'plugins/NewStory') diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp index f0b73701d1..0b1c045ff1 100644 --- a/plugins/NewStory/src/history_control.cpp +++ b/plugins/NewStory/src/history_control.cpp @@ -370,7 +370,6 @@ void NewstoryListData::EnsureVisible(int item) if (scrollTopItem >= item) { scrollTopItem = item; scrollTopPixel = 0; - InvalidateRect(m_hwnd, 0, FALSE); } else { RECT rc; @@ -393,10 +392,10 @@ void NewstoryListData::EnsureVisible(int item) if (!found) { scrollTopItem = item; scrollTopPixel = 0; - InvalidateRect(m_hwnd, 0, FALSE); } } FixScrollPosition(); + InvalidateRect(m_hwnd, 0, FALSE); } int NewstoryListData::FindNext(const wchar_t *pwszText) @@ -1170,9 +1169,9 @@ LRESULT CALLBACK NewstoryListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM case SB_THUMBTRACK: SCROLLINFO si; si.cbSize = sizeof(si); - si.fMask = SIF_TRACKPOS | SIF_RANGE; + si.fMask = SIF_ALL; GetScrollInfo(hwnd, SB_VERT, &si); - data->EnsureVisible(data->totalCount * si.nTrackPos / si.nMax); + data->EnsureVisible(si.nTrackPos); break; default: -- cgit v1.2.3