From e3be67dbaabf69b654a4cb0024ae294a8f9ea7b3 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 27 Feb 2005 14:54:57 +0100 Subject: Improved displaying the the current audio track in the ST:TNG channel display --- HISTORY | 1 + skinsttng.c | 13 +++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/HISTORY b/HISTORY index a8f49b70..62c9af3d 100644 --- a/HISTORY +++ b/HISTORY @@ -3442,3 +3442,4 @@ Video Disk Recorder Revision History - Keeping the track language codes and descriptions in Transfer Mode (thanks to Luca Olivetti). - Fixed handling repeated kAudio keys. +- Improved displaying the the current audio track in the ST:TNG channel display. diff --git a/skinsttng.c b/skinsttng.c index 94a4b66f..3760ad4d 100644 --- a/skinsttng.c +++ b/skinsttng.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * 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 @@ -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); } } - 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) @@ -295,9 +292,13 @@ void cSkinSTTNGDisplayChannel::Flush(void) { if (withInfo) { if (!message) { - cString date = DayDateTime(); 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; -- cgit v1.2.3