diff options
author | louis <louis.braun@gmx.de> | 2013-09-09 17:30:32 +0200 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2013-09-09 17:30:32 +0200 |
commit | 58cd765519e4f0c8d07a048521282dd72db8448f (patch) | |
tree | 4a692f2557bab5ab29ff8b39fca079e95f20f0ee /menuitem.c | |
parent | ec3e7d3688b83c611a01ec16a2ef0f13d51e2e68 (diff) | |
download | skin-nopacity-58cd765519e4f0c8d07a048521282dd72db8448f.tar.gz skin-nopacity-58cd765519e4f0c8d07a048521282dd72db8448f.tar.bz2 |
Added option to display plain channels and EPG information without time in channels menu (closes Feature 1377)
Diffstat (limited to 'menuitem.c')
-rw-r--r-- | menuitem.c | 51 |
1 files changed, 45 insertions, 6 deletions
@@ -563,6 +563,13 @@ void cNopacityScheduleMenuItem::DrawRemaining(int x, int y, int width) { cNopacityChannelMenuItem::cNopacityChannelMenuItem(cOsd *osd, const cChannel *Channel, bool sel, cRect *vidWin) : cNopacityMenuItem (osd, "", sel) { this->Channel = Channel; this->vidWin = vidWin; + strEntry = ""; + strEntryFull = ""; + strChannelSource = ""; + strChannelInfo = ""; + strEpgInfo = ""; + strEpgInfoFull = ""; + strTimeInfo = ""; } cNopacityChannelMenuItem::~cNopacityChannelMenuItem(void) { @@ -617,20 +624,52 @@ int cNopacityChannelMenuItem::CheckScrollable(bool hasIcon) { void cNopacityChannelMenuItem::SetTextFull(void) { tColor clrFont = (current)?Theme.Color(clrMenuFontMenuItemHigh):Theme.Color(clrMenuFontMenuItem); pixmapTextScroller->Fill(clrTransparent); - pixmapTextScroller->DrawText(cPoint(5, (height/2 - font->Height())/2), strEntryFull.c_str(), clrFont, clrTransparent, font); + int heightChannelName = 0; + if (config.menuChannelDisplayMode == 2) { + heightChannelName = (height - font->Height())/2; + } else { + heightChannelName = (height/2 - font->Height())/2; + } + pixmapTextScroller->DrawText(cPoint(5, heightChannelName), strEntryFull.c_str(), clrFont, clrTransparent, font); if (config.menuChannelDisplayMode == 1) { - pixmapTextScroller->DrawText(cPoint(5, height/2 + (height/4 - fontSmall->Height())/2), strTimeInfo.c_str(), clrFont, clrTransparent, fontSmall); - pixmapTextScroller->DrawText(cPoint(5, 3*height/4 + (height/4 - fontSmall->Height())/2), strEpgInfoFull.c_str(), clrFont, clrTransparent, fontSmall); + int heightTimeInfo = 0; + int heightEPGInfo = 0; + if (config.menuChannelDisplayTime) { + heightTimeInfo = height/2 + (height/4 - fontSmall->Height())/2; + heightEPGInfo = 3*height/4 + (height/4 - fontSmall->Height())/2; + } else { + heightEPGInfo = height/2 + (height/4 - fontSmall->Height())/2; + } + if (config.menuChannelDisplayTime) { + pixmapTextScroller->DrawText(cPoint(5, heightTimeInfo), strTimeInfo.c_str(), clrFont, clrTransparent, fontSmall); + } + pixmapTextScroller->DrawText(cPoint(5, heightEPGInfo), strEpgInfoFull.c_str(), clrFont, clrTransparent, fontSmall); } } void cNopacityChannelMenuItem::SetTextShort(void) { tColor clrFont = (current)?Theme.Color(clrMenuFontMenuItemHigh):Theme.Color(clrMenuFontMenuItem); pixmapTextScroller->Fill(clrTransparent); - pixmapTextScroller->DrawText(cPoint(5, (height/2 - font->Height())/2), strEntry.c_str(), clrFont, clrTransparent, font); + int heightChannelName = 0; + if (config.menuChannelDisplayMode == 2) { + heightChannelName = (height - font->Height())/2; + } else { + heightChannelName = (height/2 - font->Height())/2; + } + pixmapTextScroller->DrawText(cPoint(5, heightChannelName), strEntry.c_str(), clrFont, clrTransparent, font); if (config.menuChannelDisplayMode == 1) { - pixmapTextScroller->DrawText(cPoint(5, height/2 + (height/4 - fontSmall->Height())/2), strTimeInfo.c_str(), clrFont, clrTransparent, fontSmall); - pixmapTextScroller->DrawText(cPoint(5, 3*height/4 + (height/4 - fontSmall->Height())/2), strEpgInfo.c_str(), clrFont, clrTransparent, fontSmall); + int heightTimeInfo = 0; + int heightEPGInfo = 0; + if (config.menuChannelDisplayTime) { + heightTimeInfo = height/2 + (height/4 - fontSmall->Height())/2; + heightEPGInfo = 3*height/4 + (height/4 - fontSmall->Height())/2; + } else { + heightEPGInfo = height/2 + (height/4 - fontSmall->Height())/2; + } + if (config.menuChannelDisplayTime) { + pixmapTextScroller->DrawText(cPoint(5, heightTimeInfo), strTimeInfo.c_str(), clrFont, clrTransparent, fontSmall); + } + pixmapTextScroller->DrawText(cPoint(5, heightEPGInfo), strEpgInfo.c_str(), clrFont, clrTransparent, fontSmall); } } |