diff options
author | Martin Schirrmacher <vdr.skinflatplus@schirrmacher.eu> | 2014-11-30 13:52:36 +0100 |
---|---|---|
committer | Martin Schirrmacher <vdr.skinflatplus@schirrmacher.eu> | 2014-11-30 13:52:36 +0100 |
commit | a7a9dd6fa19e67c3953dfea75e2f1ccf2db2a379 (patch) | |
tree | e360cb09658c7f9d737489a12347615728486f0a | |
parent | 7077eba3c3bf4ff2f641b5873e414ad9c3c541ba (diff) | |
download | skin-flatplus-a7a9dd6fa19e67c3953dfea75e2f1ccf2db2a379.tar.gz skin-flatplus-a7a9dd6fa19e67c3953dfea75e2f1ccf2db2a379.tar.bz2 |
update dvb devices widget alignment
-rw-r--r-- | displaymenu.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/displaymenu.c b/displaymenu.c index dbce9d52..51e62b56 100644 --- a/displaymenu.c +++ b/displaymenu.c @@ -4017,7 +4017,7 @@ int cFlatDisplayMenu::DrawMainMenuWidgetDVBDevices(int wLeft, int wWidth, int Co actualNumDevices++; std::stringstream strDevice; - strDevice << i << ": " << *(device->DeviceType()) << " - "; + cString channelName; const cChannel *channel = device->GetCurrentlyTunedTransponder(); if( i == deviceLiveTV ) { @@ -4057,9 +4057,22 @@ int cFlatDisplayMenu::DrawMainMenuWidgetDVBDevices(int wLeft, int wWidth, int Co strDevice << tr("not used"); } } - - contentWidget.AddText(strDevice.str().c_str(), false, cRect(marginItem, ContentTop, wWidth - marginItem*2, fontSmlHeight), + 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); + + 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); + + left += fontSml->Width("XXXXXXXX"); + str = *channelName; + contentWidget.AddText(*str, false, cRect(left, ContentTop, wWidth - marginItem*2, fontSmlHeight), Theme.Color(clrMenuEventFontInfo), Theme.Color(clrMenuEventBg), fontSml); + ContentTop += fontSmlHeight; } |