epgplus: use getScrollBarData() function

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

Origin message was:
------------------
- epgplus: use getScrollBarData() function
This commit is contained in:
vanhofen
2017-06-14 14:57:09 +02:00
parent 4b7010aa29
commit e5b68550fb

View File

@@ -1429,8 +1429,12 @@ void EpgPlus::paint()
this->timeLine->paintGrid();
// paint slider
int total_pages = ((this->channelList->getSize() - 1) / this->maxNumberOfDisplayableEntries) + 1;
int current_page = this->selectedChannelEntry == NULL ? 0 : (this->selectedChannelEntry->index / this->maxNumberOfDisplayableEntries);
int total_pages;
int current_page;
getScrollBarData(&total_pages, &current_page,
this->channelList->getSize(),
this->maxNumberOfDisplayableEntries,
this->selectedChannelEntry == NULL ? 0 : this->selectedChannelEntry->index);
paintScrollBar(this->sliderX, this->sliderY, this->sliderWidth, this->sliderHeight, total_pages, current_page);
}