mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
- epgplus: use global paintScrollBar function to paint scrollbar
This commit is contained in:
@@ -80,8 +80,7 @@ static EpgPlus::FontSetting fontSettingTable[] =
|
|||||||
static EpgPlus::SizeSetting sizeSettingTable[] =
|
static EpgPlus::SizeSetting sizeSettingTable[] =
|
||||||
{
|
{
|
||||||
{EpgPlus::EPGPlus_channelentry_width, -15 }, /* 15 percent of screen width */
|
{EpgPlus::EPGPlus_channelentry_width, -15 }, /* 15 percent of screen width */
|
||||||
{EpgPlus::EPGPlus_channelentry_separationlineheight, 2},
|
{EpgPlus::EPGPlus_channelentry_separationlineheight, 2}
|
||||||
{EpgPlus::EPGPlus_slider_width, 15}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static bool bigfont = false;
|
static bool bigfont = false;
|
||||||
@@ -696,7 +695,7 @@ void EpgPlus::init()
|
|||||||
Footer::init();
|
Footer::init();
|
||||||
|
|
||||||
channelsTableWidth = sizes[EPGPlus_channelentry_width];
|
channelsTableWidth = sizes[EPGPlus_channelentry_width];
|
||||||
sliderWidth = sizes[EPGPlus_slider_width];
|
sliderWidth = SCROLLBAR_WIDTH;
|
||||||
|
|
||||||
int headerHeight = Header::getUsedHeight();
|
int headerHeight = Header::getUsedHeight();
|
||||||
int timeLineHeight = TimeLine::getUsedHeight();
|
int timeLineHeight = TimeLine::getUsedHeight();
|
||||||
@@ -1306,14 +1305,10 @@ void EpgPlus::paint()
|
|||||||
this->timeLine->paintGrid();
|
this->timeLine->paintGrid();
|
||||||
|
|
||||||
// paint slider
|
// paint slider
|
||||||
this->frameBuffer->paintBoxRel(this->sliderX, this->sliderY, this->sliderWidth, this->sliderHeight, COL_MENUCONTENT_PLUS_0);
|
int total_pages = ((this->channelList->getSize() - 1) / this->maxNumberOfDisplayableEntries) + 1;
|
||||||
|
int current_page = this->selectedChannelEntry == NULL ? 0 : (this->selectedChannelEntry->index / this->maxNumberOfDisplayableEntries);
|
||||||
|
|
||||||
int tmp = ((this->channelList->getSize() - 1) / this->maxNumberOfDisplayableEntries) + 1;
|
paintScrollBar(this->sliderX, this->sliderY, this->sliderWidth, this->sliderHeight, total_pages, current_page);
|
||||||
float sliderKnobHeight = float((sliderHeight - 4) / tmp);
|
|
||||||
int sliderKnobPosition = this->selectedChannelEntry == NULL ? 0 : (this->selectedChannelEntry->index / this->maxNumberOfDisplayableEntries);
|
|
||||||
|
|
||||||
this->frameBuffer->paintBoxRel(this->sliderX + 2, this->sliderY + (int(sliderKnobPosition * sliderKnobHeight)),
|
|
||||||
this->sliderWidth - 4, int (sliderKnobHeight) , COL_SCROLLBAR_ACTIVE_PLUS_0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// -- EPG+ Menue Handler Class
|
// -- EPG+ Menue Handler Class
|
||||||
|
@@ -50,7 +50,6 @@ class EpgPlus
|
|||||||
{
|
{
|
||||||
EPGPlus_channelentry_width = 0,
|
EPGPlus_channelentry_width = 0,
|
||||||
EPGPlus_channelentry_separationlineheight,
|
EPGPlus_channelentry_separationlineheight,
|
||||||
EPGPlus_slider_width,
|
|
||||||
NumberOfSizeSettings
|
NumberOfSizeSettings
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user