Fixed drawing very long menu titles in the LCARS skin

This commit is contained in:
Klaus Schmidinger 2017-06-23 16:03:51 +02:00
parent 9cf7328452
commit 139a93156b
3 changed files with 4 additions and 2 deletions

View File

@ -3274,6 +3274,7 @@ Matthias Senzel <matthias.senzel@t-online.de>
for reporting a bug in switching channels in the Schedule menu after going through for reporting a bug in switching channels in the Schedule menu after going through
various Now and Schedule menus for different channels various Now and Schedule menus for different channels
for the "jumpingseconds" patch for the "jumpingseconds" patch
for reporting a bug in drawing very long menu titles in the LCARS skin
Marek Nazarko <mnazarko@gmail.com> Marek Nazarko <mnazarko@gmail.com>
for translating OSD texts to the Polish language for translating OSD texts to the Polish language

View File

@ -9142,3 +9142,4 @@ Video Disk Recorder Revision History
- Updated the Italian OSD texts (thanks to Diego Pierotto). - Updated the Italian OSD texts (thanks to Diego Pierotto).
- Now skipping a leading '/' in AddDirectory(), to avoid double slashes (reported by - Now skipping a leading '/' in AddDirectory(), to avoid double slashes (reported by
Chris Mayo). Chris Mayo).
- Fixed drawing very long menu titles in the LCARS skin (reported by Matthias Senzel).

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: skinlcars.c 4.4 2017/04/20 08:46:42 kls Exp $ * $Id: skinlcars.c 4.5 2017/06/23 15:52:03 kls Exp $
*/ */
// "Star Trek: The Next Generation"(R) is a registered trademark of Paramount Pictures, // "Star Trek: The Next Generation"(R) is a registered trademark of Paramount Pictures,
@ -1551,7 +1551,7 @@ void cSkinLCARSDisplayMenu::SetTitle(const char *Title)
{ {
if (MenuCategory() != mcMain) { if (MenuCategory() != mcMain) {
const cFont *font = cFont::GetFont(fontOsd); const cFont *font = cFont::GetFont(fontOsd);
int w = font->Width(Title); int w = min(font->Width(Title), xa07 - xa06 - Gap);
osd->DrawRectangle(xa06, yt00, xa07 - w - Gap - 1, yt01 - 1, frameColor); osd->DrawRectangle(xa06, yt00, xa07 - w - Gap - 1, yt01 - 1, frameColor);
osd->DrawText(xa07 - w - Gap, yt00, Title, Theme.Color(clrMenuTitle), Theme.Color(clrBackground), font, w + Gap, yt01 - yt00, taRight); osd->DrawText(xa07 - w - Gap, yt00, Title, Theme.Color(clrMenuTitle), Theme.Color(clrBackground), font, w + Gap, yt01 - yt00, taRight);
} }