mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Fixed some issues with text backgrounds in flat themes (closes Tickets 1480 and 1486)
This commit is contained in:
parent
3e5aec2117
commit
06ed8b3567
2
HISTORY
2
HISTORY
@ -94,3 +94,5 @@ Version 1.1.0
|
|||||||
- Added Event Short Text (if available) to RecName (Closes Ticket 1490)
|
- Added Event Short Text (if available) to RecName (Closes Ticket 1490)
|
||||||
- Fixed OSD Background Color (Closes Ticket 1474)
|
- Fixed OSD Background Color (Closes Ticket 1474)
|
||||||
- Rounded Corners for color buttons (Closes Ticket 1475)
|
- Rounded Corners for color buttons (Closes Ticket 1475)
|
||||||
|
- Fixed some issues with text backgrounds in flat themes (closes
|
||||||
|
Tickets 1480 and 1486)
|
||||||
|
@ -154,23 +154,27 @@ void cRecMenuItemButtonYesNo::setBackground() {
|
|||||||
if (tvguideConfig.style == eStyleGraphical) {
|
if (tvguideConfig.style == eStyleGraphical) {
|
||||||
drawBackgroundGraphical(bgButton, yesActive&&active);
|
drawBackgroundGraphical(bgButton, yesActive&&active);
|
||||||
colorTextBack = clrTransparent;
|
colorTextBack = clrTransparent;
|
||||||
|
colorTextNoBack = clrTransparent;
|
||||||
colorText = (active&&yesActive)?theme.Color(clrFontActive):theme.Color(clrFont);
|
colorText = (active&&yesActive)?theme.Color(clrFontActive):theme.Color(clrFont);
|
||||||
colorTextNo = (active&&!yesActive)?theme.Color(clrFontActive):theme.Color(clrFont);
|
colorTextNo = (active&&!yesActive)?theme.Color(clrFontActive):theme.Color(clrFont);
|
||||||
pixmapNo->drawBackgroundGraphical(bgButton, active&&!yesActive);
|
pixmapNo->drawBackgroundGraphical(bgButton, active&&!yesActive);
|
||||||
} else {
|
} else {
|
||||||
|
tColor colorNoBack;
|
||||||
if (active) {
|
if (active) {
|
||||||
if (yesActive) {
|
if (yesActive) {
|
||||||
color = theme.Color(clrHighlight);
|
color = theme.Color(clrHighlight);
|
||||||
colorBlending = theme.Color(clrHighlightBlending);
|
colorBlending = theme.Color(clrHighlightBlending);
|
||||||
colorText = theme.Color(clrFontActive);
|
colorText = theme.Color(clrFontActive);
|
||||||
pixmapNo->setColor( theme.Color(clrGrid1),
|
colorNoBack = theme.Color(clrGrid1);
|
||||||
|
pixmapNo->setColor( colorNoBack,
|
||||||
theme.Color(clrGrid1Blending));
|
theme.Color(clrGrid1Blending));
|
||||||
colorTextNo = theme.Color(clrFont);
|
colorTextNo = theme.Color(clrFont);
|
||||||
} else {
|
} else {
|
||||||
color = theme.Color(clrGrid1);
|
color = theme.Color(clrGrid1);
|
||||||
colorBlending = theme.Color(clrGrid1Blending);
|
colorBlending = theme.Color(clrGrid1Blending);
|
||||||
colorText = theme.Color(clrFont);
|
colorText = theme.Color(clrFont);
|
||||||
pixmapNo->setColor( theme.Color(clrHighlight),
|
colorNoBack = theme.Color(clrHighlight);
|
||||||
|
pixmapNo->setColor( colorNoBack,
|
||||||
theme.Color(clrHighlightBlending));
|
theme.Color(clrHighlightBlending));
|
||||||
colorTextNo = theme.Color(clrFontActive);
|
colorTextNo = theme.Color(clrFontActive);
|
||||||
}
|
}
|
||||||
@ -178,11 +182,13 @@ void cRecMenuItemButtonYesNo::setBackground() {
|
|||||||
color = theme.Color(clrGrid1);
|
color = theme.Color(clrGrid1);
|
||||||
colorBlending = theme.Color(clrGrid1Blending);
|
colorBlending = theme.Color(clrGrid1Blending);
|
||||||
colorText = theme.Color(clrFont);
|
colorText = theme.Color(clrFont);
|
||||||
pixmapNo->setColor( theme.Color(clrGrid1),
|
colorNoBack = theme.Color(clrGrid1);
|
||||||
|
pixmapNo->setColor( colorNoBack,
|
||||||
theme.Color(clrGrid1Blending));
|
theme.Color(clrGrid1Blending));
|
||||||
colorTextNo = theme.Color(clrFont);
|
colorTextNo = theme.Color(clrFont);
|
||||||
}
|
}
|
||||||
colorTextBack = (tvguideConfig.style == eStyleFlat)?color:clrTransparent;
|
colorTextBack = (tvguideConfig.style == eStyleFlat)?color:clrTransparent;
|
||||||
|
colorTextNoBack = (tvguideConfig.style == eStyleFlat)?colorNoBack:clrTransparent;
|
||||||
drawBackground();
|
drawBackground();
|
||||||
drawBorder();
|
drawBorder();
|
||||||
pixmapNo->drawBackground();
|
pixmapNo->drawBackground();
|
||||||
@ -194,8 +200,8 @@ void cRecMenuItemButtonYesNo::Draw(void) {
|
|||||||
int textYesX = (pixmap->ViewPort().Width() - font->Width(*textYes)) / 2;
|
int textYesX = (pixmap->ViewPort().Width() - font->Width(*textYes)) / 2;
|
||||||
int textNoX = (pixmapNo->Width() - font->Width(*textNo)) / 2;
|
int textNoX = (pixmapNo->Width() - font->Width(*textNo)) / 2;
|
||||||
int textY = (height - font->Height()) / 2;
|
int textY = (height - font->Height()) / 2;
|
||||||
pixmap->DrawText(cPoint(textYesX, textY), *textYes, colorText, clrTransparent, font);
|
pixmap->DrawText(cPoint(textYesX, textY), *textYes, colorText, colorTextBack, font);
|
||||||
pixmapNo->DrawText(cPoint(textNoX, textY), *textNo, colorTextNo, clrTransparent, font);
|
pixmapNo->DrawText(cPoint(textNoX, textY), *textNo, colorTextNo, colorTextNoBack, font);
|
||||||
}
|
}
|
||||||
|
|
||||||
eRecMenuState cRecMenuItemButtonYesNo::ProcessKey(eKeys Key) {
|
eRecMenuState cRecMenuItemButtonYesNo::ProcessKey(eKeys Key) {
|
||||||
@ -1383,9 +1389,9 @@ void cRecMenuItemTimer::Draw(void) {
|
|||||||
cString timeEnd = TimeString(timer->StopTime());
|
cString timeEnd = TimeString(timer->StopTime());
|
||||||
cString timerTime = cString::sprintf("%s - %s", *timeStart, *timeEnd);
|
cString timerTime = cString::sprintf("%s - %s", *timeStart, *timeEnd);
|
||||||
cString channelInfo = cString::sprintf("%s, %s %d", *channelName, tr("Transp."), channelTransponder);
|
cString channelInfo = cString::sprintf("%s, %s %d", *channelName, tr("Transp."), channelTransponder);
|
||||||
pixmap->DrawText(cPoint(textX, textHeightLine1), *timerTitle, theme.Color(clrFont), clrTransparent, font);
|
pixmap->DrawText(cPoint(textX, textHeightLine1), *timerTitle, theme.Color(clrFont), colorTextBack, font);
|
||||||
pixmap->DrawText(cPoint(textX, textHeightLine2), *timerTime, theme.Color(clrFont), clrTransparent, fontSmall);
|
pixmap->DrawText(cPoint(textX, textHeightLine2), *timerTime, theme.Color(clrFont), colorTextBack, fontSmall);
|
||||||
pixmap->DrawText(cPoint(textX, textHeightLine3), *channelInfo, theme.Color(clrFont), clrTransparent, fontSmall);
|
pixmap->DrawText(cPoint(textX, textHeightLine3), *channelInfo, theme.Color(clrFont), colorTextBack, fontSmall);
|
||||||
|
|
||||||
DrawTimerConflict();
|
DrawTimerConflict();
|
||||||
}
|
}
|
||||||
@ -1523,7 +1529,7 @@ void cRecMenuItemTimerConflictHeader::Draw(void) {
|
|||||||
cString headerText = tr("Timer Conflict");
|
cString headerText = tr("Timer Conflict");
|
||||||
int xHeader = (xConfl - font->Width(*headerText)) / 2;
|
int xHeader = (xConfl - font->Width(*headerText)) / 2;
|
||||||
int yHeader = (height - font->Height()) / 2;
|
int yHeader = (height - font->Height()) / 2;
|
||||||
pixmap->DrawText(cPoint(xHeader, yHeader), *headerText, theme.Color(clrFont), clrTransparent, font);
|
pixmap->DrawText(cPoint(xHeader, yHeader), *headerText, theme.Color(clrFont), colorTextBack, font);
|
||||||
|
|
||||||
pixmap->DrawRectangle(cRect(xConfl, 0, widthConfl, height), theme.Color(clrRecMenuTimerConflictBackground));
|
pixmap->DrawRectangle(cRect(xConfl, 0, widthConfl, height), theme.Color(clrRecMenuTimerConflictBackground));
|
||||||
|
|
||||||
@ -1544,10 +1550,10 @@ void cRecMenuItemTimerConflictHeader::Draw(void) {
|
|||||||
int xConflStop = width - fontSmall->Width(*strConflStop) - 2;
|
int xConflStop = width - fontSmall->Width(*strConflStop) - 2;
|
||||||
int xOverlapStart = xOverlap - fontSmall->Width(*strOverlapStart) - 2;
|
int xOverlapStart = xOverlap - fontSmall->Width(*strOverlapStart) - 2;
|
||||||
int xOverlapStop = xOverlap + widthOverlap + 2;
|
int xOverlapStop = xOverlap + widthOverlap + 2;
|
||||||
pixmap->DrawText(cPoint(xConflStart, y1), *strConflStart, theme.Color(clrRecMenuTimerConflictBar), clrTransparent, fontSmall);
|
pixmap->DrawText(cPoint(xConflStart, y1), *strConflStart, theme.Color(clrRecMenuTimerConflictBar), colorTextBack, fontSmall);
|
||||||
pixmap->DrawText(cPoint(xConflStop, y1), *strConflStop, theme.Color(clrRecMenuTimerConflictBar), clrTransparent, fontSmall);
|
pixmap->DrawText(cPoint(xConflStop, y1), *strConflStop, theme.Color(clrRecMenuTimerConflictBar), colorTextBack, fontSmall);
|
||||||
pixmap->DrawText(cPoint(xOverlapStart, y2), *strOverlapStart, theme.Color(clrRecMenuTimerConflictOverlap), clrTransparent, fontSmall);
|
pixmap->DrawText(cPoint(xOverlapStart, y2), *strOverlapStart, theme.Color(clrRecMenuTimerConflictOverlap), colorTextBack, fontSmall);
|
||||||
pixmap->DrawText(cPoint(xOverlapStop, y2), *strOverlapStop, theme.Color(clrRecMenuTimerConflictOverlap), clrTransparent, fontSmall);
|
pixmap->DrawText(cPoint(xOverlapStop, y2), *strOverlapStop, theme.Color(clrRecMenuTimerConflictOverlap), colorTextBack, fontSmall);
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- cRecMenuItemEvent -------------------------------------------------------
|
// --- cRecMenuItemEvent -------------------------------------------------------
|
||||||
|
@ -121,6 +121,7 @@ private:
|
|||||||
bool yesActive;
|
bool yesActive;
|
||||||
cStyledPixmap *pixmapNo;
|
cStyledPixmap *pixmapNo;
|
||||||
tColor colorTextNo;
|
tColor colorTextNo;
|
||||||
|
tColor colorTextNoBack;
|
||||||
public:
|
public:
|
||||||
cRecMenuItemButtonYesNo(cString textYes,
|
cRecMenuItemButtonYesNo(cString textYes,
|
||||||
cString textNo,
|
cString textNo,
|
||||||
|
@ -123,6 +123,7 @@ eOSState cRecMenuManager::StateMachine(eRecMenuState nextState) {
|
|||||||
if (ev) {
|
if (ev) {
|
||||||
activeMenu->Hide();
|
activeMenu->Hide();
|
||||||
detailView = new cDetailView(ev);
|
detailView = new cDetailView(ev);
|
||||||
|
detailView->setContent();
|
||||||
detailView->drawHeader();
|
detailView->drawHeader();
|
||||||
detailView->drawContent();
|
detailView->drawContent();
|
||||||
detailView->drawScrollbar();
|
detailView->drawScrollbar();
|
||||||
@ -410,6 +411,7 @@ eOSState cRecMenuManager::StateMachine(eRecMenuState nextState) {
|
|||||||
if (ev) {
|
if (ev) {
|
||||||
activeMenu->Hide();
|
activeMenu->Hide();
|
||||||
detailView = new cDetailView(ev);
|
detailView = new cDetailView(ev);
|
||||||
|
detailView->setContent();
|
||||||
detailView->drawHeader();
|
detailView->drawHeader();
|
||||||
detailView->drawContent();
|
detailView->drawContent();
|
||||||
detailView->drawScrollbar();
|
detailView->drawScrollbar();
|
||||||
|
Loading…
Reference in New Issue
Block a user