font color of active grid themable

This commit is contained in:
louis 2013-05-28 17:06:53 +02:00
parent a90ee76c4b
commit 6a6db7ff52
9 changed files with 20 additions and 11 deletions

View File

@ -57,23 +57,24 @@ void cDummyGrid::setText() {
} }
void cDummyGrid::drawText() { void cDummyGrid::drawText() {
tColor colorText = (active)?theme.Color(clrFontActive):theme.Color(clrFont);
if (tvguideConfig.displayMode == eVertical) { if (tvguideConfig.displayMode == eVertical) {
if (Height()/tvguideConfig.minutePixel < 6) if (Height()/tvguideConfig.minutePixel < 6)
return; return;
int textHeight = tvguideConfig.FontGrid->Height(); int textHeight = tvguideConfig.FontGrid->Height();
int textLines = text->Lines(); int textLines = text->Lines();
for (int i=0; i<textLines; i++) { for (int i=0; i<textLines; i++) {
pixmap->DrawText(cPoint(borderWidth, borderWidth + i*textHeight), text->GetLine(i), theme.Color(clrFont), clrTransparent, tvguideConfig.FontGrid); pixmap->DrawText(cPoint(borderWidth, borderWidth + i*textHeight), text->GetLine(i), colorText, clrTransparent, tvguideConfig.FontGrid);
} }
} else if (tvguideConfig.displayMode == eHorizontal) { } else if (tvguideConfig.displayMode == eHorizontal) {
if (Width()/tvguideConfig.minutePixel < 10) { if (Width()/tvguideConfig.minutePixel < 10) {
int titleY = (tvguideConfig.rowHeight - tvguideConfig.FontGridHorizontal->Height())/2; int titleY = (tvguideConfig.rowHeight - tvguideConfig.FontGridHorizontal->Height())/2;
pixmap->DrawText(cPoint(borderWidth - 2, titleY), "...", theme.Color(clrFont), clrTransparent, tvguideConfig.FontGridHorizontal); pixmap->DrawText(cPoint(borderWidth - 2, titleY), "...", colorText, clrTransparent, tvguideConfig.FontGridHorizontal);
return; return;
} }
int titleY = (tvguideConfig.rowHeight - tvguideConfig.FontGridHorizontal->Height())/2; int titleY = (tvguideConfig.rowHeight - tvguideConfig.FontGridHorizontal->Height())/2;
pixmap->DrawText(cPoint(borderWidth, titleY), *strText, theme.Color(clrFont), clrTransparent, tvguideConfig.FontGridHorizontal); pixmap->DrawText(cPoint(borderWidth, titleY), *strText, colorText, clrTransparent, tvguideConfig.FontGridHorizontal);
} }
} }
cString cDummyGrid::getText(void) { cString cDummyGrid::getText(void) {

View File

@ -71,20 +71,21 @@ void cEpgGrid::setText() {
} }
void cEpgGrid::drawText() { void cEpgGrid::drawText() {
tColor colorText = (active)?theme.Color(clrFontActive):theme.Color(clrFont);
if (tvguideConfig.displayMode == eVertical) { if (tvguideConfig.displayMode == eVertical) {
if (Height()/tvguideConfig.minutePixel < 6) if (Height()/tvguideConfig.minutePixel < 6)
return; return;
int textHeight = tvguideConfig.FontGrid->Height(); int textHeight = tvguideConfig.FontGrid->Height();
int textLines = text->Lines(); int textLines = text->Lines();
for (int i=0; i<textLines; i++) { for (int i=0; i<textLines; i++) {
pixmap->DrawText(cPoint(borderWidth, borderWidth + i*textHeight), text->GetLine(i), theme.Color(clrFont), clrTransparent, tvguideConfig.FontGrid); pixmap->DrawText(cPoint(borderWidth, borderWidth + i*textHeight), text->GetLine(i), colorText, clrTransparent, tvguideConfig.FontGrid);
} }
int extTextLines = extText->Lines(); int extTextLines = extText->Lines();
int offset = (textLines+1)*textHeight - 0.5*textHeight; int offset = (textLines+1)*textHeight - 0.5*textHeight;
textHeight = tvguideConfig.FontGridSmall->Height(); textHeight = tvguideConfig.FontGridSmall->Height();
if ((Height()-textHeight-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), theme.Color(clrFont), clrTransparent, tvguideConfig.FontGridSmall); pixmap->DrawText(cPoint(borderWidth, borderWidth + offset + i*textHeight), extText->GetLine(i), colorText, clrTransparent, tvguideConfig.FontGridSmall);
} }
} }
if (hasTimer) if (hasTimer)
@ -92,13 +93,13 @@ void cEpgGrid::drawText() {
} else if (tvguideConfig.displayMode == eHorizontal) { } else if (tvguideConfig.displayMode == eHorizontal) {
if (Width()/tvguideConfig.minutePixel < 10) { if (Width()/tvguideConfig.minutePixel < 10) {
int titleY = (tvguideConfig.rowHeight - tvguideConfig.FontGridHorizontal->Height())/2; int titleY = (tvguideConfig.rowHeight - tvguideConfig.FontGridHorizontal->Height())/2;
pixmap->DrawText(cPoint(borderWidth - 2, titleY), "...", theme.Color(clrFont), clrTransparent, tvguideConfig.FontGridHorizontal); pixmap->DrawText(cPoint(borderWidth - 2, titleY), "...", colorText, clrTransparent, tvguideConfig.FontGridHorizontal);
return; return;
} }
pixmap->DrawText(cPoint(borderWidth, borderWidth), *timeString, theme.Color(clrFont), clrTransparent, tvguideConfig.FontGridHorizontalSmall); pixmap->DrawText(cPoint(borderWidth, borderWidth), *timeString, colorText, clrTransparent, tvguideConfig.FontGridHorizontalSmall);
cString strTitle = CutText(event->Title(), viewportHeight, tvguideConfig.FontGridHorizontal).c_str(); cString strTitle = CutText(event->Title(), viewportHeight, tvguideConfig.FontGridHorizontal).c_str();
int titleY = tvguideConfig.FontGridHorizontalSmall->Height() + (tvguideConfig.rowHeight - tvguideConfig.FontGridHorizontalSmall->Height() - tvguideConfig.FontGridHorizontal->Height())/2; int titleY = tvguideConfig.FontGridHorizontalSmall->Height() + (tvguideConfig.rowHeight - tvguideConfig.FontGridHorizontalSmall->Height() - tvguideConfig.FontGridHorizontal->Height())/2;
pixmap->DrawText(cPoint(borderWidth, titleY), *strTitle, theme.Color(clrFont), clrTransparent, tvguideConfig.FontGridHorizontal); pixmap->DrawText(cPoint(borderWidth, titleY), *strTitle, colorText, clrTransparent, tvguideConfig.FontGridHorizontal);
} }
} }

View File

@ -9,6 +9,7 @@ clrGrid2Blending = FF000000
clrHighlight = FF7A6D6D clrHighlight = FF7A6D6D
clrHighlightBlending = FF1C1919 clrHighlightBlending = FF1C1919
clrFont = FFFFFFFF clrFont = FFFFFFFF
clrFontActive = FFFFFFFF
clrFontHeader = FF000000 clrFontHeader = FF000000
clrFontButtons = FFFFFFFF clrFontButtons = FFFFFFFF
clrHeader = FF8B9194 clrHeader = FF8B9194

View File

@ -9,6 +9,7 @@ clrGrid2Blending = FF000000
clrHighlight = FFFF4D00 clrHighlight = FFFF4D00
clrHighlightBlending = FF000000 clrHighlightBlending = FF000000
clrFont = FFFFFFFF clrFont = FFFFFFFF
clrFontActive = FFFFFFFF
clrFontHeader = FFFFFFFF clrFontHeader = FFFFFFFF
clrFontButtons = FFFFFFFF clrFontButtons = FFFFFFFF
clrHeader = FF000000 clrHeader = FF000000

View File

@ -9,6 +9,7 @@ clrGrid2Blending = 90000000
clrHighlight = EE0033FF clrHighlight = EE0033FF
clrHighlightBlending = DD000000 clrHighlightBlending = DD000000
clrFont = FFFFFFFF clrFont = FFFFFFFF
clrFontActive = FFFFFFFF
clrFontHeader = FFFFFFFF clrFontHeader = FFFFFFFF
clrFontButtons = FFFFFFFF clrFontButtons = FFFFFFFF
clrHeader = EE888888 clrHeader = EE888888

View File

@ -9,6 +9,7 @@ clrGrid2Blending = 90000000
clrHighlight = DDBB0000 clrHighlight = DDBB0000
clrHighlightBlending = DD000000 clrHighlightBlending = DD000000
clrFont = FFFFFFFF clrFont = FFFFFFFF
clrFontActive = FFFFFFFF
clrFontHeader = FFFFFFFF clrFontHeader = FFFFFFFF
clrFontButtons = FFFFFFFF clrFontButtons = FFFFFFFF
clrHeader = EE888888 clrHeader = EE888888

View File

@ -9,6 +9,7 @@ clrGrid2Blending = 90000000
clrHighlight = EE006600 clrHighlight = EE006600
clrHighlightBlending = 22000000 clrHighlightBlending = 22000000
clrFont = FFFFFFFF clrFont = FFFFFFFF
clrFontActive = FFFFFFFF
clrFontHeader = FFFFFFFF clrFontHeader = FFFFFFFF
clrFontButtons = FFFFFFFF clrFontButtons = FFFFFFFF
clrHeader = EE888888 clrHeader = EE888888

View File

@ -1,17 +1,18 @@
Description = nOpacity IceBlue Description = nOpacity IceBlue
clrDoBlending = FFFFFFFF clrDoBlending = 00000000
clrBackground = DDFFFFFF clrBackground = DDFFFFFF
clrBackgroundOSD = DDFFFFFF clrBackgroundOSD = DDFFFFFF
clrGrid1 = BB555555 clrGrid1 = BB555555
clrGrid2 = BB888888 clrGrid2 = BB888888
clrHighlight = FF000044 clrHighlight = FF000044
clrFont = FF000000 clrFont = FF000000
clrFontActive = FFFFFFFF
clrFontButtons = FFFFFFFF clrFontButtons = FFFFFFFF
clrFontHeader = FF000000 clrFontHeader = FF000000
clrHeader = FFFFFFFF clrHeader = FFFFFFFF
clrBorder = FF000000 clrBorder = FF000000
clrStatusHeader = 00000000 clrStatusHeader = FFFFFFFF
clrStatusHeaderBlending = 00000000 clrStatusHeaderBlending = FFFFFFFF
clrTimeline1 = FFDDDDDD clrTimeline1 = FFDDDDDD
clrTimeline1Blending = 00000000 clrTimeline1Blending = 00000000
clrTimeline2 = FF000000 clrTimeline2 = FF000000

View File

@ -16,6 +16,7 @@ THEME_CLR(theme, clrGrid2Blending, 0xFF000000);
THEME_CLR(theme, clrHighlight, 0xFFFF4D00); THEME_CLR(theme, clrHighlight, 0xFFFF4D00);
THEME_CLR(theme, clrHighlightBlending, 0xFF000000); THEME_CLR(theme, clrHighlightBlending, 0xFF000000);
THEME_CLR(theme, clrFont, clrWhite); THEME_CLR(theme, clrFont, clrWhite);
THEME_CLR(theme, clrFontActive, clrWhite);
THEME_CLR(theme, clrFontHeader, clrWhite); THEME_CLR(theme, clrFontHeader, clrWhite);
THEME_CLR(theme, clrFontButtons, clrWhite); THEME_CLR(theme, clrFontButtons, clrWhite);
THEME_CLR(theme, clrStatusHeader, clrBlack); THEME_CLR(theme, clrStatusHeader, clrBlack);