diff --git a/src/gui/bouquetlist.cpp b/src/gui/bouquetlist.cpp index 892c3edb4..1c519567b 100644 --- a/src/gui/bouquetlist.cpp +++ b/src/gui/bouquetlist.cpp @@ -295,7 +295,7 @@ int CBouquetList::show(bool bShowChannelList) CVFD::getInstance()->setMode(CVFD::MODE_MENU_UTF8, ""); - width = w_max (500, 0); + width = w_max (g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getWidth()*55, 20);//500 height = h_max (440, 40); /* assuming all color icons must have same size */ diff --git a/src/gui/timerlist.cpp b/src/gui/timerlist.cpp index dc4557c1b..36fdfed38 100644 --- a/src/gui/timerlist.cpp +++ b/src/gui/timerlist.cpp @@ -680,12 +680,14 @@ void CTimerList::paintItem(int pos) char zStopTime[25] = {0}; struct tm *stopTime = localtime(&(timer.stopTime)); strftime(zStopTime,20,"%d.%m. %H:%M",stopTime); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+10,ypos+fheight, 150, zAlarmTime, color, fheight, true); // UTF-8 + int fw = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getWidth(); +printf("#########%i#######\n",fw); + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+10,ypos+fheight, fw*12, zAlarmTime, color, fheight, true); // UTF-8 if (timer.stopTime != 0) { - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+10,ypos+2*fheight, 150, zStopTime, color, fheight, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+10,ypos+2*fheight, fw*12, zStopTime, color, fheight, true); // UTF-8 } - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+160,ypos+fheight, (real_width-160)/2-5, convertTimerRepeat2String(timer.eventRepeat), color, fheight, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+fw*13,ypos+fheight, (real_width-fw*13)/2-5, convertTimerRepeat2String(timer.eventRepeat), color, fheight, true); // UTF-8 if (timer.eventRepeat != CTimerd::TIMERREPEAT_ONCE) { @@ -696,9 +698,9 @@ void CTimerList::paintItem(int pos) sprintf(srepeatcount,"00"); else sprintf(srepeatcount,"%ux",timer.repeatCount); - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+160+(real_width-300)/2,ypos+fheight, (real_width-160)/2-5, srepeatcount, color, fheight, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+fw*13+(real_width-fw*23)/2,ypos+fheight, (real_width-fw*13)/2-5, srepeatcount, color, fheight, true); // UTF-8 } - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+160+(real_width-160)/2,ypos+fheight, (real_width-160)/2-5, convertTimerType2String(timer.eventType), color, fheight, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+fw*13+(real_width-fw*13)/2,ypos+fheight, (real_width-fw*13)/2-5, convertTimerType2String(timer.eventType), color, fheight, true); // UTF-8 std::string zAddData(""); switch (timer.eventType) { @@ -769,7 +771,7 @@ void CTimerList::paintItem(int pos) break; default: {} } - g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+160,ypos+2*fheight, real_width-165, zAddData, color, fheight, true); // UTF-8 + g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->RenderString(x+fw*13,ypos+2*fheight, real_width-(fw*13+5), zAddData, color, fheight, true); // UTF-8 // LCD Display if (liststart+pos==selected) {