Skip to content

Commit

Permalink
keep LIVE in the upper right corner
Browse files Browse the repository at this point in the history
  • Loading branch information
rellla committed Jun 13, 2023
1 parent fbf9e9c commit fbb1b2a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions displaymenu.c
Expand Up @@ -76,6 +76,7 @@ cLCARSNGDisplayMenu::cLCARSNGDisplayMenu(void)
// The color buttons in the main menu:
int r = lineHeight;
xd07 = xa09 - Gap;
xd08 = xd07; // right border of DrawLive()/ DrawPlay()
xd00 = xd07 - Gap - 16 * r;
if ((float)(xd07 - xd00) / (float)xa09 > 0.33)
zoom = 1;
Expand Down Expand Up @@ -242,6 +243,7 @@ void cLCARSNGDisplayMenu::SetCoordinateY(int y)
int yd = (MenuCategory() == mcChannel && viewmode == esmalscreen) ? yb15 : yc04;
int r = lineHeight;
xd07 = xd - Gap;
xd08 = xa09 - Gap;
int fac = (zoom > 1) ? 0.75 : 1;
xd06 = xd07 - (fac * 0.5 * r);
xd05 = xd06 - (7 - zoom - ((zoom > 1) ? 1 : 0)) * r;
Expand Down Expand Up @@ -1084,7 +1086,7 @@ void cLCARSNGDisplayMenu::DrawLive(const cChannel *Channel)
if (zoom && (viewmode == escaledvideo))
osd->DrawText(xa01, yc04 + Margin, tr("LIVE"), Theme.Color(clrChannelFrameFg), Theme.Color(clrChannelFrameBg), cFont::GetFont(fontOsd), xa05 - xa01 - Margin, lineHeight - Margin, taRight | taBorder);
else
osd->DrawText(xd07 - w, yd00, tr("LIVE"), channelFrameColorBr, ColorBg, tallFont, w, tallFont->Height(), taRight | taBorder);
osd->DrawText(xd08 - w, yd00, tr("LIVE"), channelFrameColorBr, clrTransparent, tallFont, w, tallFont->Height(), taRight | taBorder);
}
if (!Channel)
return;
Expand Down Expand Up @@ -1157,7 +1159,7 @@ void cLCARSNGDisplayMenu::DrawPlay(cControl *Control)
if (zoom && (viewmode == escaledvideo))
osd->DrawText(xa01, yc04 + Margin, tr("PLAY"), Theme.Color(clrReplayFrameFg), Theme.Color(clrReplayFrameBg), cFont::GetFont(fontOsd), xa05 - xa01 - Margin, lineHeight - Margin, taRight | taBorder);
else
osd->DrawText(xd07 - w, yd00, tr("PLAY"), replayFrameColorBr, ColorBg, tallFont, w, tallFont->Height(), taRight | taBorder);
osd->DrawText(xd08 - w, yd00, tr("PLAY"), replayFrameColorBr, ColorBg, tallFont, w, tallFont->Height(), taRight | taBorder);
}
// The current progress:
int Current = 0;
Expand Down
2 changes: 1 addition & 1 deletion displaymenu.h
Expand Up @@ -66,7 +66,7 @@ class cLCARSNGDisplayMenu : public cSkinDisplayMenu {
int xi00, xi01, xi02, xi03;
int yi00, yi01;
int xb00, xb01, xb02, xb03, xb04, xb05, xb06, xb07, xb08, xb09, xb10, xb11, xb12, xb13, xb14, xb15;
int xd00, xd01, xd02, xd03, xd04, xd05, xd06, xd07;
int xd00, xd01, xd02, xd03, xd04, xd05, xd06, xd07, xd08;
int yd00, yd01, yd02, yd03, yd04, yd05;
int xs; // starting column for signal display
int lineHeight;
Expand Down

0 comments on commit fbb1b2a

Please sign in to comment.