From 28b3cc80df2e04edbfb81ac9bbdc4ba8d2eb8afe Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Thu, 15 Jun 2017 01:01:55 +0200 Subject: [PATCH] - filebrowser: use getScrollBarData() function Signed-off-by: Thilo Graf --- src/gui/filebrowser.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/filebrowser.cpp b/src/gui/filebrowser.cpp index 6e877060d..5c4fa4e23 100644 --- a/src/gui/filebrowser.cpp +++ b/src/gui/filebrowser.cpp @@ -1472,8 +1472,9 @@ void CFileBrowser::paint() paintItem(count); //scrollbar - int total_pages = filelist.size() == 0 ? 1 : ((filelist.size() - 1) / listmaxshow) + 1; - int current_page = (selected / listmaxshow); + int total_pages; + int current_page; + getScrollBarData(&total_pages, ¤t_page, filelist.size(), listmaxshow, selected); paintScrollBar(x + width - SCROLLBAR_WIDTH, y + header_height, SCROLLBAR_WIDTH, item_height*listmaxshow, total_pages, current_page); }