diff options
author | louis <louis.braun@gmx.de> | 2013-09-11 17:14:57 +0200 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2013-09-11 17:14:57 +0200 |
commit | 83fe0cb122cac8e5ecb69264e4688837f233afcc (patch) | |
tree | 00c69b8eac53a7c2c4543a45b02d124d1ed96999 | |
parent | b16e410cd7f641ffb858945377579d535ba531f0 (diff) | |
download | skin-nopacity-83fe0cb122cac8e5ecb69264e4688837f233afcc.tar.gz skin-nopacity-83fe0cb122cac8e5ecb69264e4688837f233afcc.tar.bz2 |
Improved display of channel separators (closes tickets 1477 and 1482)
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | displaychannel.c | 61 | ||||
-rw-r--r-- | displaychannel.h | 2 | ||||
-rw-r--r-- | icons/darkred/skinIcons/arrowLeftChannelSep.png | bin | 0 -> 1764 bytes | |||
-rw-r--r-- | icons/darkred/skinIcons/arrowRightChannelSep.png | bin | 0 -> 1802 bytes | |||
-rw-r--r-- | icons/green/skinIcons/arrowLeftChannelSep.png | bin | 0 -> 1797 bytes | |||
-rw-r--r-- | icons/green/skinIcons/arrowRightChannelSep.png | bin | 0 -> 1845 bytes | |||
-rw-r--r-- | icons/skinIcons/arrowLeftChannelSep.png | bin | 0 -> 1768 bytes | |||
-rw-r--r-- | icons/skinIcons/arrowRightChannelSep.png | bin | 0 -> 1855 bytes |
9 files changed, 50 insertions, 14 deletions
@@ -244,3 +244,4 @@ Version 0.1.4 - Added channel number in display of reruns in detailed EPG view (closes Feature 1402) - Changed display of trick speed in displayReplay (closes Feature 1433) +- Improved display of channel separators (closes tickets 1477 and 1482) diff --git a/displaychannel.c b/displaychannel.c index 77bf517..84dd2fb 100644 --- a/displaychannel.c +++ b/displaychannel.c @@ -176,6 +176,9 @@ void cNopacityDisplayChannel::CreatePixmaps(void) { } pixmapScreenResolution = NULL; pixmapSignalMeter = NULL; + pixmapSignalStrength = NULL; + pixmapSignalQuality = NULL; + pixmapSignalLabel = NULL; pixmapPoster = NULL; } @@ -464,6 +467,28 @@ void cNopacityDisplayChannel::DrawSignalMeter(void) { } } +void cNopacityDisplayChannel::ShowSignalMeter(void) { + if(pixmapSignalStrength) + pixmapSignalStrength->SetLayer(3); + if(pixmapSignalQuality) + pixmapSignalQuality->SetLayer(3); + if(pixmapSignalMeter) + pixmapSignalMeter->SetLayer(4); + if(pixmapSignalLabel) + pixmapSignalLabel->SetLayer(3); +} + +void cNopacityDisplayChannel::HideSignalMeter(void) { + if(pixmapSignalStrength) + pixmapSignalStrength->SetLayer(-1); + if(pixmapSignalQuality) + pixmapSignalQuality->SetLayer(-1); + if(pixmapSignalMeter) + pixmapSignalMeter->SetLayer(-1); + if(pixmapSignalLabel) + pixmapSignalLabel->SetLayer(-1); +} + void cNopacityDisplayChannel::DrawSignal(void) { time_t Now = time(NULL); if (Now != lastSignalDisplay) { @@ -491,8 +516,7 @@ void cNopacityDisplayChannel::DrawSourceInfo(const cChannel *Channel) { if (config.displaySignalStrength) x += signalWidth; pixmapFooter->Fill(clrTransparent); - pixmapFooter->DrawText(cPoint(x, (streamInfoHeight - fontDate->Height())/2), channelInfo, Theme.Color(clrChannelHead), clrTransparent, fontDate); - + pixmapFooter->DrawText(cPoint(x, (streamInfoHeight - fontDate->Height())/2), channelInfo, Theme.Color(clrChannelHead), clrTransparent, fontDate); } void cNopacityDisplayChannel::SetChannel(const cChannel *Channel, int Number) { @@ -545,32 +569,37 @@ void cNopacityDisplayChannel::SetChannel(const cChannel *Channel, int Number) { pixmapLogo->DrawImage(cPoint(config.logoBorder, (height-config.logoHeight)/2), imgLoader.GetImage()); } } + ShowSignalMeter(); } else { DrawChannelGroups(Channel, ChannelName); + HideSignalMeter(); + pixmapFooter->Fill(clrTransparent); } } void cNopacityDisplayChannel::DrawChannelGroups(const cChannel *Channel, cString ChannelName) { int ySep; + int ySepNextPrevIcon; cPixmap *infoPixmap; - cString prevSymbol = " < "; - cString nextSymbol = " > "; + int prevNextSize = 64; if (withInfo) { pixmapProgressBar->Fill(clrTransparent); pixmapEPGInfo->Fill(clrTransparent); ySep = (epgInfoHeight-fontChannelGroup->Height())/2 - fontChannelGroup->Height()/2; + ySepNextPrevIcon = (epgInfoHeight - prevNextSize)/2 - fontChannelGroup->Height()/2; infoPixmap = pixmapEPGInfo; } else { ySep = (channelInfoHeight - fontChannelGroup->Height())/2; + ySepNextPrevIcon = (channelInfoHeight - prevNextSize)/2; infoPixmap = pixmapChannelInfo; } int widthSep = fontChannelGroup->Width(*ChannelName); int xSep = (config.displayPrevNextChannelGroup)?(infoWidth * 2 / 5):0; infoPixmap->DrawText(cPoint(xSep, ySep), *ChannelName, Theme.Color(clrChannelHead), clrTransparent, fontChannelGroup); + cImageLoader imgLoader; if (config.logoPosition != lpNone) { - cImageLoader imgLoader; cString separator = cString::sprintf("separatorlogos/%s", *ChannelName); if (imgLoader.LoadLogo(*separator)) { pixmapLogo->DrawImage(cPoint(config.logoBorder, (height-config.logoHeight)/2), imgLoader.GetImage()); @@ -590,24 +619,28 @@ void cNopacityDisplayChannel::DrawChannelGroups(const cChannel *Channel, cString int ySepNextPrev = ySep + (fontChannelGroup->Height() - fontChannelGroupSmall->Height())/2; if (prevAvailable) { - int xSymbol = xSep - fontChannelGroup->Width(*prevSymbol); - infoPixmap->DrawText(cPoint(xSymbol, ySep), *prevSymbol, Theme.Color(clrChannelHead), clrTransparent, fontChannelGroup); - int xSepPrev = xSymbol - fontChannelGroupSmall->Width(prevChannelSep); + int xSymbol = xSep - prevNextSize - 10; + if (imgLoader.LoadIcon("skinIcons/arrowLeftChannelSep", prevNextSize)) { + infoPixmap->DrawImage(cPoint(xSymbol, ySepNextPrevIcon), imgLoader.GetImage()); + } + int xSepPrev = xSymbol - 10 - fontChannelGroupSmall->Width(prevChannelSep); if (xSepPrev < 0) { prevChannelSep = CutText(*prevChannelSep, xSymbol, fontChannelGroupSmall).c_str(); - xSepPrev = xSymbol - fontChannelGroupSmall->Width(prevChannelSep); + xSepPrev = xSymbol - 10 - fontChannelGroupSmall->Width(prevChannelSep); } - infoPixmap->DrawText(cPoint(xSepPrev, ySepNextPrev), *prevChannelSep, Theme.Color(clrChannelEPG), clrTransparent, fontChannelGroupSmall); + infoPixmap->DrawText(cPoint(xSepPrev, ySepNextPrev), *prevChannelSep, Theme.Color(clrChannelEPGInfo), clrTransparent, fontChannelGroupSmall); } if (nextAvailable) { - int xSymbol = xSep + widthSep; - infoPixmap->DrawText(cPoint(xSymbol, ySep), *nextSymbol, Theme.Color(clrChannelHead), clrTransparent, fontChannelGroup); - int xSepNext = xSymbol + fontChannelGroup->Width(*nextSymbol); + int xSymbol = xSep + widthSep + 10; + if (imgLoader.LoadIcon("skinIcons/arrowRightChannelSep", prevNextSize)) { + infoPixmap->DrawImage(cPoint(xSymbol, ySepNextPrevIcon), imgLoader.GetImage()); + } + int xSepNext = xSymbol + 10 + prevNextSize; int spaceAvailable = infoPixmap->DrawPort().Width() - xSepNext; if (fontChannelGroupSmall->Width(nextChannelSep) > spaceAvailable) { nextChannelSep = CutText(*nextChannelSep, spaceAvailable, fontChannelGroupSmall).c_str(); } - infoPixmap->DrawText(cPoint(xSepNext, ySepNextPrev), *nextChannelSep, Theme.Color(clrChannelEPG), clrTransparent, fontChannelGroupSmall); + infoPixmap->DrawText(cPoint(xSepNext, ySepNextPrev), *nextChannelSep, Theme.Color(clrChannelEPGInfo), clrTransparent, fontChannelGroupSmall); } } diff --git a/displaychannel.h b/displaychannel.h index 73a285e..d4d1403 100644 --- a/displaychannel.h +++ b/displaychannel.h @@ -79,6 +79,8 @@ private: void DrawIconsSingle(const cChannel *Channel); void DrawScreenResolution(void); void DrawSignalMeter(void); + void ShowSignalMeter(void); + void HideSignalMeter(void); void DrawSignal(void); void DrawSourceInfo(const cChannel *Channel); void DrawChannelGroups(const cChannel *Channel, cString ChannelName); diff --git a/icons/darkred/skinIcons/arrowLeftChannelSep.png b/icons/darkred/skinIcons/arrowLeftChannelSep.png Binary files differnew file mode 100644 index 0000000..d251ac3 --- /dev/null +++ b/icons/darkred/skinIcons/arrowLeftChannelSep.png diff --git a/icons/darkred/skinIcons/arrowRightChannelSep.png b/icons/darkred/skinIcons/arrowRightChannelSep.png Binary files differnew file mode 100644 index 0000000..47d9626 --- /dev/null +++ b/icons/darkred/skinIcons/arrowRightChannelSep.png diff --git a/icons/green/skinIcons/arrowLeftChannelSep.png b/icons/green/skinIcons/arrowLeftChannelSep.png Binary files differnew file mode 100644 index 0000000..9bdcdb4 --- /dev/null +++ b/icons/green/skinIcons/arrowLeftChannelSep.png diff --git a/icons/green/skinIcons/arrowRightChannelSep.png b/icons/green/skinIcons/arrowRightChannelSep.png Binary files differnew file mode 100644 index 0000000..3c380ba --- /dev/null +++ b/icons/green/skinIcons/arrowRightChannelSep.png diff --git a/icons/skinIcons/arrowLeftChannelSep.png b/icons/skinIcons/arrowLeftChannelSep.png Binary files differnew file mode 100644 index 0000000..85e456c --- /dev/null +++ b/icons/skinIcons/arrowLeftChannelSep.png diff --git a/icons/skinIcons/arrowRightChannelSep.png b/icons/skinIcons/arrowRightChannelSep.png Binary files differnew file mode 100644 index 0000000..d0d9825 --- /dev/null +++ b/icons/skinIcons/arrowRightChannelSep.png |