- epgplus: use getScrollBarData() function

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
svenhoefer
2017-06-15 01:01:55 +02:00
committed by Thilo Graf
parent cf44e1a974
commit aa4723173b

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);
}