1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Improved displaying the the current audio track in the ST:TNG channel display

This commit is contained in:
Klaus Schmidinger 2005-02-27 14:54:57 +01:00
parent a0de3a6a08
commit e3be67dbaa
2 changed files with 8 additions and 6 deletions

View File

@ -3442,3 +3442,4 @@ Video Disk Recorder Revision History
- Keeping the track language codes and descriptions in Transfer Mode (thanks to - Keeping the track language codes and descriptions in Transfer Mode (thanks to
Luca Olivetti). Luca Olivetti).
- Fixed handling repeated kAudio keys. - Fixed handling repeated kAudio keys.
- Improved displaying the the current audio track in the ST:TNG channel display.

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: skinsttng.c 1.12 2005/01/08 15:37:55 kls Exp $ * $Id: skinsttng.c 1.13 2005/02/27 14:45:19 kls Exp $
*/ */
// Star Trek: The Next Generation® is a registered trademark of Paramount Pictures // Star Trek: The Next Generation® is a registered trademark of Paramount Pictures
@ -268,9 +268,6 @@ void cSkinSTTNGDisplayChannel::SetEvents(const cEvent *Present, const cEvent *Fo
osd->DrawText(x3 + 2, y3 + (2 * i + 1) * lineHeight, e->ShortText(), Theme.Color(clrChannelEpgShortText), Theme.Color(clrBackground), cFont::GetFont(fontSml), x4 - x3 - 2); osd->DrawText(x3 + 2, y3 + (2 * i + 1) * lineHeight, e->ShortText(), Theme.Color(clrChannelEpgShortText), Theme.Color(clrBackground), cFont::GetFont(fontSml), x4 - x3 - 2);
} }
} }
cDevice *Device = cDevice::PrimaryDevice();
const tTrackId *Track = Device->GetTrack(Device->GetCurrentAudioTrack());
osd->DrawText(x3 + 2, y6, Track ? Track->description : "", Theme.Color(clrChannelName), frameColor, cFont::GetFont(fontSml), x4 - x3 - 2);
} }
void cSkinSTTNGDisplayChannel::SetMessage(eMessageType Type, const char *Text) void cSkinSTTNGDisplayChannel::SetMessage(eMessageType Type, const char *Text)
@ -295,9 +292,13 @@ void cSkinSTTNGDisplayChannel::Flush(void)
{ {
if (withInfo) { if (withInfo) {
if (!message) { if (!message) {
cString date = DayDateTime();
const cFont *font = cFont::GetFont(fontSml); const cFont *font = cFont::GetFont(fontSml);
osd->DrawText(x4 - font->Width(date) - 2, y7 - font->Height(date), date, Theme.Color(clrChannelDate), frameColor, font); cString date = DayDateTime();
int w = font->Width(date);
osd->DrawText(x4 - w - 2, y7 - font->Height(date), date, Theme.Color(clrChannelDate), frameColor, font);
cDevice *Device = cDevice::PrimaryDevice();
const tTrackId *Track = Device->GetTrack(Device->GetCurrentAudioTrack());
osd->DrawText(x3 + 2, y6, Track ? Track->description : "", Theme.Color(clrChannelName), frameColor, font, x4 - x3 - w - 4);
} }
int seen = 0; int seen = 0;