diff options
| -rw-r--r-- | HISTORY | 2 | ||||
| -rw-r--r-- | menu.c | 21 |
2 files changed, 18 insertions, 5 deletions
@@ -5,6 +5,8 @@ VDR Plugin 'osdteletext' Revision History - More refactoring of the TxtStatus class (Thx to Sören Moch!) - Install plug-in to lib dir with --remove-destination as suggested by Christian Wieninger (Closes #57) +- If background is configured to completely black or transparent, + toggle between black and transparent only. 2009-01-10: version 0.8.1 - Small bugfix in channel switching code @@ -336,13 +336,24 @@ void TeletextBrowser::ExecuteAction(eTeletextAction e) { } } +// 3-state toggling between configured->transparent->black. +// If configured is black or transparent, do 2-state transparent->black only. void TeletextBrowser::ChangeBackground() { - if (Display::GetBackgroundColor() == clrBlack) - Display::SetBackgroundColor((tColor)ttSetup.configuredClrBackground); - else if (Display::GetBackgroundColor() == (tColor)ttSetup.configuredClrBackground) - Display::SetBackgroundColor(clrTransparent); - else + tColor clrConfig = (tColor)ttSetup.configuredClrBackground; + tColor clrCurrent = Display::GetBackgroundColor(); + + if (clrCurrent == clrConfig) + if (clrConfig == clrTransparent) + Display::SetBackgroundColor(clrBlack); + else + Display::SetBackgroundColor(clrTransparent); + else if (clrCurrent == clrBlack) + if (clrConfig == clrBlack) + Display::SetBackgroundColor(clrTransparent); + else + Display::SetBackgroundColor(clrConfig); + else // clrCurrent == clrTransparent Display::SetBackgroundColor(clrBlack); } |
