filebrowser: use getScrollBarData() function

Origin commit data
------------------
Commit: 33bf19278d
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-06-14 (Wed, 14 Jun 2017)

Origin message was:
------------------
- filebrowser: use getScrollBarData() function
This commit is contained in:
vanhofen
2017-06-14 14:57:09 +02:00
parent c376a89fc0
commit d99f5c3091

View File

@@ -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, &current_page, filelist.size(), listmaxshow, selected);
paintScrollBar(x + width - SCROLLBAR_WIDTH, y + header_height, SCROLLBAR_WIDTH, item_height*listmaxshow, total_pages, current_page);
}