mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Can switch off and optimize diplay time in epggrid "displayMode == Vertical"
This commit is contained in:
parent
a711aed160
commit
3f0bd75011
26
epggrid.c
26
epggrid.c
@ -92,12 +92,11 @@ void cEpgGrid::SetSwitchTimer() {
|
|||||||
|
|
||||||
void cEpgGrid::setText() {
|
void cEpgGrid::setText() {
|
||||||
if (config.displayMode == eVertical) {
|
if (config.displayMode == eVertical) {
|
||||||
cString strText;
|
text->Set(event->Title(), fontManager.FontGrid, geoManager.colWidth - 2 * borderWidth);
|
||||||
strText = cString::sprintf("%s - %s:\n%s", *(event->GetTimeString()), *(event->GetEndTimeString()), event->Title());
|
|
||||||
text->Set(*(strText), fontManager.FontGrid, geoManager.colWidth-2*borderWidth);
|
|
||||||
extText->Set(event->ShortText(), fontManager.FontGridSmall, geoManager.colWidth - 2 * borderWidth);
|
extText->Set(event->ShortText(), fontManager.FontGridSmall, geoManager.colWidth - 2 * borderWidth);
|
||||||
} else if (config.displayMode == eHorizontal) {
|
}
|
||||||
timeString = cString::sprintf("%s - %s", *(event->GetTimeString()), *(event->GetEndTimeString()));
|
if (config.showTimeInGrid) {
|
||||||
|
timeString = cString::sprintf("%s - %s:", *(event->GetTimeString()), *(event->GetEndTimeString()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -114,16 +113,21 @@ void cEpgGrid::drawText() {
|
|||||||
if (Height() / geoManager.minutePixel < 6)
|
if (Height() / geoManager.minutePixel < 6)
|
||||||
return;
|
return;
|
||||||
int textHeight = fontManager.FontGrid->Height();
|
int textHeight = fontManager.FontGrid->Height();
|
||||||
|
int textHeightSmall = fontManager.FontGridSmall->Height();
|
||||||
int textLines = text->Lines();
|
int textLines = text->Lines();
|
||||||
|
int titleY = borderWidth;
|
||||||
|
if (config.showTimeInGrid) { // mit Zeitangabe im Grid
|
||||||
|
pixmap->DrawText(cPoint(borderWidth, borderWidth), *timeString, colorText, colorTextBack, fontManager.FontGridSmall);
|
||||||
|
titleY += textHeightSmall;
|
||||||
|
}
|
||||||
for (int i = 0; i < textLines; i++) {
|
for (int i = 0; i < textLines; i++) {
|
||||||
pixmap->DrawText(cPoint(borderWidth, borderWidth + i*textHeight), text->GetLine(i), colorText, colorTextBack, fontManager.FontGrid);
|
pixmap->DrawText(cPoint(borderWidth, titleY + i * textHeight), text->GetLine(i), colorText, colorTextBack, fontManager.FontGrid);
|
||||||
}
|
}
|
||||||
int extTextLines = extText->Lines();
|
int extTextLines = extText->Lines();
|
||||||
int offset = (textLines+1)*textHeight - 0.5*textHeight;
|
int offset = titleY + (textLines + 0.5) * textHeight;
|
||||||
textHeight = fontManager.FontGridSmall->Height();
|
if ((Height() - textHeightSmall - 10) > offset) {
|
||||||
if ((Height()-textHeight-10) > offset) {
|
|
||||||
for (int i = 0; i < extTextLines; i++) {
|
for (int i = 0; i < extTextLines; i++) {
|
||||||
pixmap->DrawText(cPoint(borderWidth, borderWidth + offset + i*textHeight), extText->GetLine(i), colorText, colorTextBack, fontManager.FontGridSmall);
|
pixmap->DrawText(cPoint(borderWidth, offset + i * textHeightSmall), extText->GetLine(i), colorText, colorTextBack, fontManager.FontGridSmall);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (config.displayMode == eHorizontal) {
|
} else if (config.displayMode == eHorizontal) {
|
||||||
@ -134,7 +138,7 @@ void cEpgGrid::drawText() {
|
|||||||
}
|
}
|
||||||
cString strTitle = CutText(event->Title(), viewportHeight, fontManager.FontGridHorizontal).c_str();
|
cString strTitle = CutText(event->Title(), viewportHeight, fontManager.FontGridHorizontal).c_str();
|
||||||
int titleY = 0;
|
int titleY = 0;
|
||||||
if (config.showTimeInGrid) {
|
if (config.showTimeInGrid) { // mit Zeitangabe im Grid
|
||||||
pixmap->DrawText(cPoint(borderWidth, borderWidth), *timeString, colorText, colorTextBack, fontManager.FontGridHorizontalSmall);
|
pixmap->DrawText(cPoint(borderWidth, borderWidth), *timeString, colorText, colorTextBack, fontManager.FontGridHorizontalSmall);
|
||||||
titleY = fontManager.FontGridHorizontalSmall->Height() + (geoManager.rowHeight - fontManager.FontGridHorizontalSmall->Height() - fontManager.FontGridHorizontal->Height()) / 2;
|
titleY = fontManager.FontGridHorizontalSmall->Height() + (geoManager.rowHeight - fontManager.FontGridHorizontalSmall->Height() - fontManager.FontGridHorizontal->Height()) / 2;
|
||||||
} else {
|
} else {
|
||||||
|
2
setup.c
2
setup.c
@ -275,8 +275,8 @@ void cMenuSetupScreenLayout::Set(void) {
|
|||||||
Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Width of Channel Header (Perc. of osd width)")), &tmpConfig->channelHeaderWidthPercent, 5, 30));
|
Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Width of Channel Header (Perc. of osd width)")), &tmpConfig->channelHeaderWidthPercent, 5, 30));
|
||||||
Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Height of Timeline (Perc. of osd height)")), &tmpConfig->timeLineHeightPercent, 5, 30));
|
Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Height of Timeline (Perc. of osd height)")), &tmpConfig->timeLineHeightPercent, 5, 30));
|
||||||
Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Number of Channels to display")), &tmpConfig->channelRows, 3, 12));
|
Add(new cMenuEditIntItem(*cString::sprintf("%s%s", *indent, tr("Number of Channels to display")), &tmpConfig->channelRows, 3, 12));
|
||||||
Add(new cMenuEditBoolItem(*cString::sprintf("%s%s", *indent, tr("Display time in EPG Grids")), &tmpConfig->showTimeInGrid));
|
|
||||||
}
|
}
|
||||||
|
Add(new cMenuEditBoolItem(tr("Display time in EPG Grids"), &tmpConfig->showTimeInGrid));
|
||||||
Add(new cMenuEditIntItem(tr("Height of Headers (Status Header and EPG View, Perc. of osd height)"), &tmpConfig->headerHeightPercent, 10, 50));
|
Add(new cMenuEditIntItem(tr("Height of Headers (Status Header and EPG View, Perc. of osd height)"), &tmpConfig->headerHeightPercent, 10, 50));
|
||||||
Add(new cMenuEditIntItem(tr("Height of Footer (Perc. of osd height)"), &tmpConfig->footerHeightPercent, 3, 20));
|
Add(new cMenuEditIntItem(tr("Height of Footer (Perc. of osd height)"), &tmpConfig->footerHeightPercent, 3, 20));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user