mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-03 10:51:05 +02:00
epgplus: fix text offsets in secontary timeline
Origin commit data
------------------
Commit: 69e478c195
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-04-10 (Mon, 10 Apr 2017)
Origin message was:
------------------
- epgplus: fix text offsets in secontary timeline
This commit is contained in:
@@ -220,21 +220,25 @@ void EpgPlus::TimeLine::paintMark(time_t _startTime, int pduration, int px, int
|
|||||||
this->font->RenderString(px - textWidth - OFFSET_INNER_MIN, this->y + this->font->getHeight() + this->font->getHeight(),
|
this->font->RenderString(px - textWidth - OFFSET_INNER_MIN, this->y + this->font->getHeight() + this->font->getHeight(),
|
||||||
textWidth, timeStr, COL_MENUCONTENT_TEXT);
|
textWidth, timeStr, COL_MENUCONTENT_TEXT);
|
||||||
|
|
||||||
// display end time after mark
|
// display end time
|
||||||
timeStr = EpgPlus::getTimeString(_startTime + pduration, "%H:%M");
|
timeStr = EpgPlus::getTimeString(_startTime + pduration, "%H:%M");
|
||||||
textWidth = font->getRenderWidth(timeStr);
|
textWidth = font->getRenderWidth(timeStr);
|
||||||
|
int textX = 0;
|
||||||
|
|
||||||
if (px + pwidth + textWidth < this->x + this->width)
|
if (px + pwidth + textWidth + OFFSET_INNER_MIN < this->x + this->width)
|
||||||
{
|
{
|
||||||
this->font->RenderString(px + pwidth + OFFSET_INNER_MIN, this->y + this->font->getHeight() + this->font->getHeight(),
|
// display end time after mark
|
||||||
textWidth, timeStr, COL_MENUCONTENT_TEXT);
|
textX = px + pwidth + OFFSET_INNER_MIN;
|
||||||
}
|
}
|
||||||
else if (textWidth < pwidth - OFFSET_INNER_MID)
|
else if (textWidth < pwidth - 2*OFFSET_INNER_MIN)
|
||||||
{
|
{
|
||||||
this->font->RenderString(px + pwidth - textWidth - OFFSET_INNER_MIN, this->y + this->font->getHeight() + this->font->getHeight(),
|
// display end time before mark
|
||||||
textWidth, timeStr, COL_MENUCONTENTSELECTED_TEXT);
|
textX = px + pwidth - textWidth - OFFSET_INNER_MIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (textX)
|
||||||
|
this->font->RenderString(textX, this->y + this->font->getHeight() + this->font->getHeight(), textWidth, timeStr, COL_MENUCONTENT_TEXT);
|
||||||
|
|
||||||
// paint the separation line
|
// paint the separation line
|
||||||
if (separationLineThickness > 0)
|
if (separationLineThickness > 0)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user