From 450f5ebe7c6d832d72f82fe725c4ce1183f99f61 Mon Sep 17 00:00:00 2001 From: Martin Schirrmacher Date: Tue, 2 Dec 2014 20:27:02 +0100 Subject: update dvb devices --- displaymenu.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'displaymenu.c') 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); -- cgit v1.2.3