mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 17:01:08 +02:00
filebrowser: fix total_pages calculation for CComponentsScrollBar
Origin commit data
------------------
Commit: 628e8ea3e4
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-06-06 (Tue, 06 Jun 2017)
Origin message was:
------------------
- filebrowser: fix total_pages calculation for CComponentsScrollBar
This commit is contained in:
committed by
Michael Liebmann
parent
953fd71755
commit
1feae6f83e
@@ -1472,7 +1472,7 @@ void CFileBrowser::paint()
|
||||
paintItem(count);
|
||||
|
||||
//scrollbar
|
||||
int total_pages = ((filelist.size() - 1) / listmaxshow) + 1;
|
||||
int total_pages = filelist.size() == 0 ? 1 : ((filelist.size() - 1) / listmaxshow) + 1;
|
||||
int current_page = (selected / listmaxshow);
|
||||
|
||||
paintScrollBar(x + width - SCROLLBAR_WIDTH, y + header_height, SCROLLBAR_WIDTH, item_height*listmaxshow, total_pages, current_page);
|
||||
|
Reference in New Issue
Block a user