summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkamel5 <vdr.kamel5 (at) gmx (dot) net>2021-07-19 15:36:07 +0200
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2021-07-21 12:54:22 +0200
commit7a8886dd47c574996ad58082a865dfec58de0645 (patch)
tree7e987040122451c12cfb79b72846b1300889853e
parentf15698ebd16d8cf8d7c88d9dc3127e02db148b44 (diff)
downloadskin-lcarsng-7a8886dd47c574996ad58082a865dfec58de0645.tar.gz
skin-lcarsng-7a8886dd47c574996ad58082a865dfec58de0645.tar.bz2
Add border to ParentalRating and Errors
-rw-r--r--displaymenu.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/displaymenu.c b/displaymenu.c
index 52b4359..4b1f6ee 100644
--- a/displaymenu.c
+++ b/displaymenu.c
@@ -1503,23 +1503,28 @@ void cLCARSNGDisplayMenu::SetRecording(const cRecording *Recording)
cString buffer = cString::sprintf(" %s ", *Info->GetEvent()->GetParentalRatingString());
const cFont *font = cFont::GetFont(fontSml);
int w = font->Width(buffer);
- osd->DrawText(xt - w, y, buffer, Theme.Color(clrMenuFrameFg), frameColorBg, font, w);
- xt -= w + xi02 - xi01;
+ int yb = y + font->Height();
+ DrawRectangleOutline(osd, xt - w - 2 * Margin, y - Margin, xi01 - 1, yb + Margin - 1, frameColorBr, frameColorBg, 15);
+ osd->DrawText(xt - w - Margin, y, buffer, Theme.Color(clrMenuFrameFg), frameColorBg, font, w);
+ xt -= w + xi02 - xi01 + 2 * Margin;
}
#if (APIVERSNUM >= 20505)
if (Info->Errors() >= (1 - Config.displayError0)) {
cString buffer = cString::sprintf(" %d %s ", Info->Errors(), tr("errors"));
const cFont *font = cFont::GetFont(fontSml);
int w = font->Width(buffer);
- osd->DrawText(xt - w, y, buffer, Theme.Color(clrMenuFrameFg), frameColorBg, font, w);
- xt -= w + xi02 - xi01;
+ int yb = y + font->Height();
+ DrawRectangleOutline(osd, xt - w - 2 * Margin, y - Margin, xt - 1, yb + Margin - 1, frameColorBr, frameColorBg, 15);
+ osd->DrawText(xt - w - Margin, y, buffer, Theme.Color(clrMenuFrameFg), frameColorBg, font, w);
+ xt -= w + xi02 - xi01 + 2 * Margin;
}
#endif
if (xt != xi01) {
const cFont *font = cFont::GetFont(fontSml);
int yb = y + font->Height();
- osd->DrawRectangle(xi02, y, xi02 + lineHeight / 2 - 1, yb - 1, frameColorBg);
- osd->DrawEllipse (xi02 + lineHeight / 2, y, xi03 - 1, yb - 1, frameColorBg, 5);
+ DrawRectangleOutline(osd, xi02, y - Margin, xi02 + lineHeight / 2 - 1, yb + Margin - 1, frameColorBr, frameColorBg, 11);
+ osd->DrawEllipse (xi02 + lineHeight / 2, y - Margin, xi03 - 1, yb + Margin - 1, frameColorBr, 5);
+ osd->DrawEllipse (xi02 + lineHeight / 2, y, xi03 - Margin - 1, yb - 1, frameColorBg, 5);
}
y += font->Height();
const char *Title = Info->Title();