mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Optimize display "REC" sign in epgview
This commit is contained in:
parent
ffd3e2c79f
commit
3fee6ab13f
18
epggrid.c
18
epggrid.c
@ -169,13 +169,17 @@ void cEpgGrid::drawText() {
|
|||||||
|
|
||||||
void cEpgGrid::drawIcon(cString iconText, tColor color) {
|
void cEpgGrid::drawIcon(cString iconText, tColor color) {
|
||||||
|
|
||||||
const cFont *font = (config.displayMode == eVertical)
|
const cFont *font = (config.displayMode == eVertical) ? fontManager.FontGrid : fontManager.FontGridHorizontalSmall;
|
||||||
?fontManager.FontGrid
|
int textWidth = font->Width(*iconText) + 2 * borderWidth;
|
||||||
:fontManager.FontGridHorizontalSmall;
|
int textHeight = font->Height() + 10;
|
||||||
int textWidth = font->Width(*iconText)+2*borderWidth;
|
if ((config.displayMode == eHorizontal) && ((Width() - 2 * textWidth) < 0))
|
||||||
int textHeight = font->Height()+10;
|
pixmap->DrawEllipse( cRect(Width() - textHeight / 2 - borderWidth, Height() - textHeight - borderWidth, textHeight / 2, textHeight / 2), color);
|
||||||
pixmap->DrawRectangle( cRect(Width() - textWidth - borderWidth, Height() - textHeight - borderWidth, textWidth, textHeight), color);
|
else if ((config.displayMode == eVertical) && ((Height() - 2 * textHeight) < 0))
|
||||||
pixmap->DrawText(cPoint(Width() - textWidth, Height() - textHeight - borderWidth/2), *iconText, theme.Color(clrFont), color, font);
|
pixmap->DrawEllipse( cRect(Width() - textHeight / 2 - borderWidth, borderWidth, textHeight / 2, textHeight / 2), color);
|
||||||
|
else {
|
||||||
|
pixmap->DrawEllipse( cRect(Width() - textWidth - borderWidth, Height() - textHeight - borderWidth, textWidth, textHeight), color);
|
||||||
|
pixmap->DrawText(cPoint(Width() - textWidth, Height() - textHeight - borderWidth / 2), *iconText, theme.Color(clrFont), clrTransparent, font);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cString cEpgGrid::getTimeString(void) {
|
cString cEpgGrid::getTimeString(void) {
|
||||||
|
Loading…
Reference in New Issue
Block a user