From aa4723173b9c295d18512e05155022621f7fd6b5 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Thu, 15 Jun 2017 01:01:55 +0200 Subject: [PATCH] - epgplus: use getScrollBarData() function Signed-off-by: Thilo Graf --- src/gui/epgplus.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gui/epgplus.cpp b/src/gui/epgplus.cpp index f740daafc..b5d209dd3 100644 --- a/src/gui/epgplus.cpp +++ b/src/gui/epgplus.cpp @@ -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, ¤t_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); }