Fixed a loss of the date display in the "classic" skin's main menu

This commit is contained in:
Klaus Schmidinger 2008-01-13 12:40:05 +01:00
parent 29871d8585
commit 39a3ad2b2e
3 changed files with 8 additions and 2 deletions

View File

@ -1603,6 +1603,7 @@ Andreas Brugger <brougs78@gmx.net>
for reporting a missing 'const' in cRecordingInfo::ChannelID()
for suggesting to propagate the kInfo key to any open menu, so that it can react to
it in a context sensitive manner
for reporting a loss of the date display in the "classic" skin's main menu
Dino Ravnic <dino.ravnic@fer.hr>
for fixing some characters in the iso8859-2 font file

View File

@ -5545,3 +5545,5 @@ Video Disk Recorder Revision History
initial *.pot file.
- Fixed handling the '-l' option.
- Fixed error handling in cCuttingThread::Action() (thanks to Udo Richter).
- Fixed a loss of the date display in the "classic" skin's main menu (reported by
Andreas Brugger).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: skinclassic.c 1.18 2007/07/29 12:35:03 kls Exp $
* $Id: skinclassic.c 1.19 2008/01/13 12:38:00 kls Exp $
*/
#include "skinclassic.h"
@ -162,6 +162,7 @@ private:
int x0, x1;
int y0, y1, y2, y3, y4, y5;
int lineHeight;
int dateWidth;
cString lastDate;
void SetScrollbar(void);
public:
@ -186,6 +187,7 @@ cSkinClassicDisplayMenu::cSkinClassicDisplayMenu(void)
{
const cFont *font = cFont::GetFont(fontOsd);
lineHeight = font->Height();
dateWidth = 0;
x0 = 0;
x1 = cOsd::OsdWidth();
y0 = 0;
@ -253,7 +255,7 @@ void cSkinClassicDisplayMenu::Clear(void)
void cSkinClassicDisplayMenu::SetTitle(const char *Title)
{
const cFont *font = cFont::GetFont(fontOsd);
osd->DrawText(x0, y0, Title, Theme.Color(clrMenuTitleFg), Theme.Color(clrMenuTitleBg), font, x1 - x0);
osd->DrawText(x0, y0, Title, Theme.Color(clrMenuTitleFg), Theme.Color(clrMenuTitleBg), font, x1 - x0 - dateWidth);
}
void cSkinClassicDisplayMenu::SetButtons(const char *Red, const char *Green, const char *Yellow, const char *Blue)
@ -395,6 +397,7 @@ void cSkinClassicDisplayMenu::Flush(void)
int w = font->Width(date);
osd->DrawText(x1 - w - 2, y0, date, Theme.Color(clrMenuDate), Theme.Color(clrMenuTitleBg), font, w);
lastDate = date;
dateWidth = max(w + 2, dateWidth);
}
osd->Flush();
}