mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
- epgplus: move footer-box to bottom of screen
This commit is contained in:
@@ -429,13 +429,15 @@ Font *EpgPlus::Footer::fontBouquetChannelName = NULL;
|
|||||||
Font *EpgPlus::Footer::fontEventDescription = NULL;
|
Font *EpgPlus::Footer::fontEventDescription = NULL;
|
||||||
Font *EpgPlus::Footer::fontEventInfo1 = NULL;
|
Font *EpgPlus::Footer::fontEventInfo1 = NULL;
|
||||||
|
|
||||||
EpgPlus::Footer::Footer(CFrameBuffer * pframeBuffer, int px, int py, int pwidth, int /*height*/)
|
EpgPlus::Footer::Footer(CFrameBuffer * pframeBuffer, int px, int py, int pwidth, int pbuttonHeight)
|
||||||
{
|
{
|
||||||
this->frameBuffer = pframeBuffer;
|
this->frameBuffer = pframeBuffer;
|
||||||
this->x = px;
|
this->x = px;
|
||||||
this->y = py;
|
this->y = py;
|
||||||
this->width = pwidth;
|
this->width = pwidth;
|
||||||
this->buttonHeight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->getHeight()+8; //TODO get height from buttons
|
|
||||||
|
this->buttonHeight = pbuttonHeight;
|
||||||
|
this->buttonY = this->y - OFFSET_INTER - this->buttonHeight;
|
||||||
}
|
}
|
||||||
|
|
||||||
EpgPlus::Footer::~Footer()
|
EpgPlus::Footer::~Footer()
|
||||||
@@ -507,7 +509,7 @@ struct button_label buttonLabels[] =
|
|||||||
void EpgPlus::Footer::paintButtons(button_label * pbuttonLabels, int numberOfButtons)
|
void EpgPlus::Footer::paintButtons(button_label * pbuttonLabels, int numberOfButtons)
|
||||||
{
|
{
|
||||||
int buttonWidth = (this->width);
|
int buttonWidth = (this->width);
|
||||||
::paintButtons(this->x, this->y + this->getUsedHeight(), buttonWidth, numberOfButtons, pbuttonLabels, buttonWidth, buttonHeight);
|
::paintButtons(this->x, this->buttonY, buttonWidth, numberOfButtons, pbuttonLabels, buttonWidth, buttonHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
EpgPlus::EpgPlus()
|
EpgPlus::EpgPlus()
|
||||||
@@ -670,6 +672,7 @@ void EpgPlus::init()
|
|||||||
#endif
|
#endif
|
||||||
usableScreenWidth = frameBuffer->getScreenWidthRel();
|
usableScreenWidth = frameBuffer->getScreenWidthRel();
|
||||||
usableScreenHeight = frameBuffer->getScreenHeightRel();
|
usableScreenHeight = frameBuffer->getScreenHeightRel();
|
||||||
|
|
||||||
std::string font_file = g_settings.font_file;
|
std::string font_file = g_settings.font_file;
|
||||||
for (size_t i = 0; i < NumberOfFontSettings; ++i)
|
for (size_t i = 0; i < NumberOfFontSettings; ++i)
|
||||||
{
|
{
|
||||||
@@ -711,12 +714,14 @@ void EpgPlus::init()
|
|||||||
int timeLineHeight = TimeLine::getUsedHeight();
|
int timeLineHeight = TimeLine::getUsedHeight();
|
||||||
this->entryHeight = ChannelEntry::getUsedHeight();
|
this->entryHeight = ChannelEntry::getUsedHeight();
|
||||||
|
|
||||||
int buttonHeight = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_FOOT]->getHeight()+8; //TODO get height from buttons
|
int buttonHeight = ::paintButtons(0, 0, 0, sizeof(buttonLabels)/sizeof(button_label), buttonLabels, 0, 0, "", false, COL_MENUFOOT_TEXT, NULL, 0, false);
|
||||||
int footerHeight = Footer::getUsedHeight() + buttonHeight;
|
|
||||||
|
|
||||||
this->maxNumberOfDisplayableEntries = (this->usableScreenHeight - headerHeight - timeLineHeight - footerHeight) / this->entryHeight;
|
int footerHeight = Footer::getUsedHeight();
|
||||||
|
|
||||||
this->usableScreenHeight = headerHeight + timeLineHeight + this->maxNumberOfDisplayableEntries * this->entryHeight + footerHeight; // recalc deltaY
|
this->maxNumberOfDisplayableEntries = (this->usableScreenHeight - headerHeight - timeLineHeight - buttonHeight - OFFSET_INTER - footerHeight) / this->entryHeight;
|
||||||
|
this->bodyHeight = this->maxNumberOfDisplayableEntries * entryHeight;
|
||||||
|
|
||||||
|
this->usableScreenHeight = headerHeight + timeLineHeight + this->bodyHeight + buttonHeight + OFFSET_INTER + footerHeight; // recalc deltaY
|
||||||
this->usableScreenX = getScreenStartX(this->usableScreenWidth);
|
this->usableScreenX = getScreenStartX(this->usableScreenWidth);
|
||||||
this->usableScreenY = getScreenStartY(this->usableScreenHeight);
|
this->usableScreenY = getScreenStartY(this->usableScreenHeight);
|
||||||
|
|
||||||
@@ -734,16 +739,16 @@ void EpgPlus::init()
|
|||||||
|
|
||||||
this->channelsTableX = this->usableScreenX;
|
this->channelsTableX = this->usableScreenX;
|
||||||
this->channelsTableY = this->timeLineY + timeLineHeight;
|
this->channelsTableY = this->timeLineY + timeLineHeight;
|
||||||
this->channelsTableHeight = this->maxNumberOfDisplayableEntries * entryHeight;
|
this->channelsTableHeight = this->bodyHeight;
|
||||||
|
|
||||||
this->eventsTableX = this->channelsTableX + channelsTableWidth;
|
this->eventsTableX = this->channelsTableX + channelsTableWidth;
|
||||||
this->eventsTableY = this->channelsTableY;
|
this->eventsTableY = this->channelsTableY;
|
||||||
this->eventsTableWidth = this->usableScreenWidth - this->channelsTableWidth - this->sliderWidth;
|
this->eventsTableWidth = this->usableScreenWidth - this->channelsTableWidth - this->sliderWidth;
|
||||||
this->eventsTableHeight = this->channelsTableHeight;
|
this->eventsTableHeight = this->bodyHeight;
|
||||||
|
|
||||||
this->sliderX = this->usableScreenX + this->usableScreenWidth - this->sliderWidth;
|
this->sliderX = this->usableScreenX + this->usableScreenWidth - this->sliderWidth;
|
||||||
this->sliderY = this->eventsTableY;
|
this->sliderY = this->eventsTableY;
|
||||||
this->sliderHeight = this->channelsTableHeight;
|
this->sliderHeight = this->bodyHeight;
|
||||||
|
|
||||||
this->channelListStartIndex = 0;
|
this->channelListStartIndex = 0;
|
||||||
this->startTime = 0;
|
this->startTime = 0;
|
||||||
|
@@ -273,6 +273,8 @@ class EpgPlus
|
|||||||
int x;
|
int x;
|
||||||
int y;
|
int y;
|
||||||
int width;
|
int width;
|
||||||
|
|
||||||
|
int buttonY;
|
||||||
int buttonHeight;
|
int buttonHeight;
|
||||||
|
|
||||||
static Font* fontBouquetChannelName;
|
static Font* fontBouquetChannelName;
|
||||||
@@ -452,6 +454,8 @@ class EpgPlus
|
|||||||
int timeLineY;
|
int timeLineY;
|
||||||
int timeLineWidth;
|
int timeLineWidth;
|
||||||
|
|
||||||
|
int bodyHeight;
|
||||||
|
|
||||||
int channelsTableX;
|
int channelsTableX;
|
||||||
int channelsTableY;
|
int channelsTableY;
|
||||||
static int channelsTableWidth;
|
static int channelsTableWidth;
|
||||||
|
Reference in New Issue
Block a user