mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
pictureviewer: use getScrollBarData() function
Signed-off-by: Thilo Graf <dbt@novatux.de>
Origin commit data
------------------
Branch: ni/coolstream
Commit: cf44e1a974
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-06-15 (Thu, 15 Jun 2017)
Origin message was:
------------------
- pictureviewer: use getScrollBarData() function
Signed-off-by: Thilo Graf <dbt@novatux.de>
------------------
This commit was generated by Migit
This commit is contained in:
@@ -749,9 +749,9 @@ void CPictureViewerGui::paint()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//scrollbar
|
//scrollbar
|
||||||
int _listmaxshow = listmaxshow ? listmaxshow : 1; //avoid division by zero
|
int total_pages;
|
||||||
int total_pages = playlist.size() == 0 ? 1 : ((playlist.size() - 1) / _listmaxshow) + 1;
|
int current_page;
|
||||||
int current_page = selected / _listmaxshow;
|
getScrollBarData(&total_pages, ¤t_page, playlist.size(), listmaxshow, selected);
|
||||||
|
|
||||||
paintScrollBar(x + width - SCROLLBAR_WIDTH, y + header_height, SCROLLBAR_WIDTH, item_height*listmaxshow, total_pages, current_page);
|
paintScrollBar(x + width - SCROLLBAR_WIDTH, y + header_height, SCROLLBAR_WIDTH, item_height*listmaxshow, total_pages, current_page);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user