epgplus: use getScrollBarData() function

Signed-off-by: Thilo Graf <dbt@novatux.de>


Origin commit data
------------------
Commit: aa4723173b
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-06-15 (Thu, 15 Jun 2017)

Origin message was:
------------------
- epgplus: use getScrollBarData() function

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

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