diff options
Diffstat (limited to 'displaymenu.c')
-rw-r--r-- | displaymenu.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/displaymenu.c b/displaymenu.c index 92015903..b034c417 100644 --- a/displaymenu.c +++ b/displaymenu.c @@ -4060,10 +4060,17 @@ int cFlatDisplayMenu::DrawMainMenuWidgetDVBDevices(int wLeft, int wWidth, int Co channelName = strDevice.str().c_str(); cString str = cString::sprintf("%d", i); int left = marginItem; - contentWidget.AddText(*str, false, cRect(left, ContentTop, wWidth - marginItem*2, fontSmlHeight), - Theme.Color(clrMenuEventFontInfo), Theme.Color(clrMenuEventBg), fontSml, fontSml->Width("XX"), fontSmlHeight, taRight); + if( numDevices <= 9 ) { + contentWidget.AddText(*str, false, cRect(left, ContentTop, wWidth - marginItem*2, fontSmlHeight), + Theme.Color(clrMenuEventFontInfo), Theme.Color(clrMenuEventBg), fontSml); - left += fontSml->Width("XXX"); + left += fontSml->Width("XX"); + } else { + contentWidget.AddText(*str, false, cRect(left, ContentTop, wWidth - marginItem*2, fontSmlHeight), + Theme.Color(clrMenuEventFontInfo), Theme.Color(clrMenuEventBg), fontSml, fontSml->Width("XX"), fontSmlHeight, taRight); + + left += fontSml->Width("XXX"); + } str = *(device->DeviceType()); contentWidget.AddText(*str, false, cRect(left, ContentTop, wWidth - marginItem*2, fontSmlHeight), Theme.Color(clrMenuEventFontInfo), Theme.Color(clrMenuEventBg), fontSml, fontSml->Width("XXXXXXX"), fontSmlHeight, taLeft); |