mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 13:01:48 +00:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
2f497adf01 | ||
|
decfb2d39d | ||
|
5f4ea6b30d |
4
HISTORY
4
HISTORY
@@ -282,3 +282,7 @@ Version 1.3.2
|
|||||||
Version 1.3.3
|
Version 1.3.3
|
||||||
|
|
||||||
- Bugfix
|
- Bugfix
|
||||||
|
|
||||||
|
Version 1.3.4
|
||||||
|
|
||||||
|
- Fix for gcc11
|
||||||
|
12
epggrid.c
12
epggrid.c
@@ -20,9 +20,9 @@ cEpgGrid::~cEpgGrid(void) {
|
|||||||
void cEpgGrid::SetViewportHeight() {
|
void cEpgGrid::SetViewportHeight() {
|
||||||
int viewportHeightOld = viewportHeight;
|
int viewportHeightOld = viewportHeight;
|
||||||
if ( column->Start() > StartTime() ) {
|
if ( column->Start() > StartTime() ) {
|
||||||
viewportHeight = (min((int)EndTime(), column->Stop()) - column->Start()) /60;
|
viewportHeight = (std::min((int)EndTime(), column->Stop()) - column->Start()) / 60;
|
||||||
} else if ( column->Stop() < EndTime() ) {
|
} else if ( column->Stop() < EndTime() ) {
|
||||||
viewportHeight = (column->Stop() - StartTime()) /60;
|
viewportHeight = (column->Stop() - StartTime()) / 60;
|
||||||
if (viewportHeight < 0) viewportHeight = 0;
|
if (viewportHeight < 0) viewportHeight = 0;
|
||||||
} else {
|
} else {
|
||||||
viewportHeight = Duration() / 60;
|
viewportHeight = Duration() / 60;
|
||||||
@@ -37,11 +37,11 @@ void cEpgGrid::PositionPixmap() {
|
|||||||
int x0 = column->getX();
|
int x0 = column->getX();
|
||||||
int y0 = geoManager.statusHeaderHeight + geoManager.channelHeaderHeight + geoManager.channelGroupsHeight;
|
int y0 = geoManager.statusHeaderHeight + geoManager.channelHeaderHeight + geoManager.channelGroupsHeight;
|
||||||
if ( column->Start() < StartTime() ) {
|
if ( column->Start() < StartTime() ) {
|
||||||
y0 += (StartTime() - column->Start())/60*geoManager.minutePixel;
|
y0 += (StartTime() - column->Start()) / 60 * geoManager.minutePixel;
|
||||||
}
|
}
|
||||||
if (!pixmap) {
|
if (!pixmap) {
|
||||||
pixmap = osdManager.requestPixmap(-1, cRect(x0, y0, geoManager.colWidth, viewportHeight),
|
pixmap = osdManager.requestPixmap(-1, cRect(x0, y0, geoManager.colWidth, viewportHeight),
|
||||||
cRect(0, 0, geoManager.colWidth, Duration()/60*geoManager.minutePixel));
|
cRect(0, 0, geoManager.colWidth, Duration() / 60 * geoManager.minutePixel));
|
||||||
} else {
|
} else {
|
||||||
pixmap->SetViewPort(cRect(x0, y0, geoManager.colWidth, viewportHeight));
|
pixmap->SetViewPort(cRect(x0, y0, geoManager.colWidth, viewportHeight));
|
||||||
}
|
}
|
||||||
@@ -49,11 +49,11 @@ void cEpgGrid::PositionPixmap() {
|
|||||||
int x0 = geoManager.channelHeaderWidth + geoManager.channelGroupsWidth;
|
int x0 = geoManager.channelHeaderWidth + geoManager.channelGroupsWidth;
|
||||||
int y0 = column->getY();
|
int y0 = column->getY();
|
||||||
if ( column->Start() < StartTime() ) {
|
if ( column->Start() < StartTime() ) {
|
||||||
x0 += (StartTime() - column->Start())/60*geoManager.minutePixel;
|
x0 += (StartTime() - column->Start()) / 60 * geoManager.minutePixel;
|
||||||
}
|
}
|
||||||
if (!pixmap) {
|
if (!pixmap) {
|
||||||
pixmap = osdManager.requestPixmap(-1, cRect(x0, y0, viewportHeight, geoManager.rowHeight),
|
pixmap = osdManager.requestPixmap(-1, cRect(x0, y0, viewportHeight, geoManager.rowHeight),
|
||||||
cRect(0, 0, Duration()/60*geoManager.minutePixel, geoManager.rowHeight));
|
cRect(0, 0, Duration() / 60 * geoManager.minutePixel, geoManager.rowHeight));
|
||||||
} else {
|
} else {
|
||||||
pixmap->SetViewPort(cRect(x0, y0, viewportHeight, geoManager.rowHeight ));
|
pixmap->SetViewPort(cRect(x0, y0, viewportHeight, geoManager.rowHeight ));
|
||||||
}
|
}
|
||||||
|
@@ -557,7 +557,7 @@ void cRecMenuItemSelect::Draw(void) {
|
|||||||
void cRecMenuItemSelect::DrawValue(void) {
|
void cRecMenuItemSelect::DrawValue(void) {
|
||||||
pixmapVal->Fill(clrTransparent);
|
pixmapVal->Fill(clrTransparent);
|
||||||
std::string textVal = strings[currentVal];
|
std::string textVal = strings[currentVal];
|
||||||
int iconSize = min(128, height);
|
int iconSize = std::min(128, height);
|
||||||
int textX = width - font->Width(textVal.c_str()) - iconSize;
|
int textX = width - font->Width(textVal.c_str()) - iconSize;
|
||||||
int textY = (height - font->Height()) / 2;
|
int textY = (height - font->Height()) / 2;
|
||||||
pixmapVal->DrawText(cPoint(textX, textY), textVal.c_str(), colorText, clrTransparent, font);
|
pixmapVal->DrawText(cPoint(textX, textY), textVal.c_str(), colorText, clrTransparent, font);
|
||||||
@@ -664,7 +664,7 @@ void cRecMenuItemSelectDirectory::Draw(void) {
|
|||||||
|
|
||||||
void cRecMenuItemSelectDirectory::DrawValue(void) {
|
void cRecMenuItemSelectDirectory::DrawValue(void) {
|
||||||
pixmapVal->Fill(clrTransparent);
|
pixmapVal->Fill(clrTransparent);
|
||||||
int iconSize = min(128, height);
|
int iconSize = std::min(128, height);
|
||||||
int textX = std::max(width - font->Width(folders[currentVal].c_str()) - iconSize, 10 + font->Width(*text) + 2 * iconSize);
|
int textX = std::max(width - font->Width(folders[currentVal].c_str()) - iconSize, 10 + font->Width(*text) + 2 * iconSize);
|
||||||
int textY = (height - font->Height()) / 2;
|
int textY = (height - font->Height()) / 2;
|
||||||
pixmapVal->DrawText(cPoint(textX, textY), folders[currentVal].c_str(), colorText, clrTransparent, font, width - textX - iconSize, font->Height(), taTop | taRight);
|
pixmapVal->DrawText(cPoint(textX, textY), folders[currentVal].c_str(), colorText, clrTransparent, font, width - textX - iconSize, font->Height(), taTop | taRight);
|
||||||
@@ -967,7 +967,7 @@ char *cRecMenuItemText::GetSMSKeys(int num) {
|
|||||||
if (specialChar)
|
if (specialChar)
|
||||||
addition = 1;
|
addition = 1;
|
||||||
Utf8FromArray(startCharUtf8, p, numChars+addition);
|
Utf8FromArray(startCharUtf8, p, numChars+addition);
|
||||||
int maxChars = min(numChars+1+addition, 8);
|
int maxChars = std::min(numChars+1+addition, 8);
|
||||||
char *smskey = new char[maxChars];
|
char *smskey = new char[maxChars];
|
||||||
Utf8Strn0Cpy(smskey, p, maxChars);
|
Utf8Strn0Cpy(smskey, p, maxChars);
|
||||||
return smskey;
|
return smskey;
|
||||||
@@ -2163,7 +2163,7 @@ void cRecMenuItemDayChooser::SetSizes(void) {
|
|||||||
if (charWidth > maxWidth)
|
if (charWidth > maxWidth)
|
||||||
maxWidth = charWidth;
|
maxWidth = charWidth;
|
||||||
}
|
}
|
||||||
daysSize = min(maxWidth + 15, height - 4);
|
daysSize = std::min(maxWidth + 15, height - 4);
|
||||||
daysX = width - 10 - 7 * daysSize;
|
daysX = width - 10 - 7 * daysSize;
|
||||||
daysY = (height - daysSize) / 2;
|
daysY = (height - daysSize) / 2;
|
||||||
}
|
}
|
||||||
|
@@ -27,7 +27,7 @@
|
|||||||
#error "VDR-2.0.0 API version or greater is required!"
|
#error "VDR-2.0.0 API version or greater is required!"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const char *VERSION = "1.3.3";
|
static const char *VERSION = "1.3.4";
|
||||||
static const char *DESCRIPTION = tr("A fancy 2d EPG Viewer");
|
static const char *DESCRIPTION = tr("A fancy 2d EPG Viewer");
|
||||||
static const char *MAINMENUENTRY = "Tvguide";
|
static const char *MAINMENUENTRY = "Tvguide";
|
||||||
|
|
||||||
|
14
view.c
14
view.c
@@ -222,7 +222,7 @@ void cView::DrawContent(std::string *text) {
|
|||||||
wText.Set(text->c_str(), font, width - 2 * border);
|
wText.Set(text->c_str(), font, width - 2 * border);
|
||||||
int lineHeight = font->Height();
|
int lineHeight = font->Height();
|
||||||
int textLines = wText.Lines();
|
int textLines = wText.Lines();
|
||||||
int textHeight = lineHeight * textLines + 2*border;
|
int textHeight = lineHeight * textLines + 2 * border;
|
||||||
int yText = border;
|
int yText = border;
|
||||||
CreateContent(textHeight);
|
CreateContent(textHeight);
|
||||||
for (int i=0; i < textLines; i++) {
|
for (int i=0; i < textLines; i++) {
|
||||||
@@ -252,14 +252,14 @@ void cView::DrawFloatingContent(std::string *infoText, cTvMedia *img, cTvMedia *
|
|||||||
int lineHeight = font->Height();
|
int lineHeight = font->Height();
|
||||||
int textLinesTall = wTextTall.Lines();
|
int textLinesTall = wTextTall.Lines();
|
||||||
int textLinesFull = wTextFull.Lines();
|
int textLinesFull = wTextFull.Lines();
|
||||||
int textHeight = lineHeight * (textLinesTall + textLinesFull) + 2*border;
|
int textHeight = lineHeight * (textLinesTall + textLinesFull) + 2 * border;
|
||||||
int yText = border;
|
int yText = border;
|
||||||
CreateContent(max(textHeight, imgHeight + 2*border));
|
CreateContent(std::max(textHeight, imgHeight + 2 * border));
|
||||||
for (int i=0; i < textLinesTall; i++) {
|
for (int i = 0; i < textLinesTall; i++) {
|
||||||
pixmapContent->DrawText(cPoint(border, yText), wTextTall.GetLine(i), theme.Color(clrFont), clrTransparent, font);
|
pixmapContent->DrawText(cPoint(border, yText), wTextTall.GetLine(i), theme.Color(clrFont), clrTransparent, font);
|
||||||
yText += lineHeight;
|
yText += lineHeight;
|
||||||
}
|
}
|
||||||
for (int i=0; i < textLinesFull; i++) {
|
for (int i = 0; i < textLinesFull; i++) {
|
||||||
pixmapContent->DrawText(cPoint(border, yText), wTextFull.GetLine(i), theme.Color(clrFont), clrTransparent, font);
|
pixmapContent->DrawText(cPoint(border, yText), wTextFull.GetLine(i), theme.Color(clrFont), clrTransparent, font);
|
||||||
yText += lineHeight;
|
yText += lineHeight;
|
||||||
}
|
}
|
||||||
@@ -274,13 +274,13 @@ void cView::DrawFloatingContent(std::string *infoText, cTvMedia *img, cTvMedia *
|
|||||||
osdManager.flush();
|
osdManager.flush();
|
||||||
if (imgLoader.LoadPoster(img2->path.c_str(), imgWidth2, imgHeight2)) {
|
if (imgLoader.LoadPoster(img2->path.c_str(), imgWidth2, imgHeight2)) {
|
||||||
if (Running() && pixmapContent)
|
if (Running() && pixmapContent)
|
||||||
pixmapContent->DrawImage(cPoint(width - imgWidth2 - border, imgHeight + 2*border), imgLoader.GetImage());
|
pixmapContent->DrawImage(cPoint(width - imgWidth2 - border, imgHeight + 2 * border), imgLoader.GetImage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void cView::CreateFloatingTextWrapper(cTextWrapper *twNarrow, cTextWrapper *twFull, std::string *text, int widthImg, int heightImg) {
|
void cView::CreateFloatingTextWrapper(cTextWrapper *twNarrow, cTextWrapper *twFull, std::string *text, int widthImg, int heightImg) {
|
||||||
int lineHeight = font->Height();
|
int lineHeight = font->Height();
|
||||||
int linesNarrow = (heightImg + 2*border)/ lineHeight;
|
int linesNarrow = (heightImg + 2 * border)/ lineHeight;
|
||||||
int linesDrawn = 0;
|
int linesDrawn = 0;
|
||||||
int y = 0;
|
int y = 0;
|
||||||
int widthNarrow = width - 3 * border - widthImg;
|
int widthNarrow = width - 3 * border - widthImg;
|
||||||
|
Reference in New Issue
Block a user