mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
gui/bouquetlist: use Font::getMaxDigitWidth()
This commit is contained in:
@@ -600,16 +600,12 @@ void CBouquetList::paint()
|
|||||||
int lastnum = liststart + listmaxshow;
|
int lastnum = liststart + listmaxshow;
|
||||||
int bsize = Bouquets.empty() ? 1 : Bouquets.size();
|
int bsize = Bouquets.empty() ? 1 : Bouquets.size();
|
||||||
|
|
||||||
if(lastnum<10)
|
int maxDigitWidth = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->getMaxDigitWidth();
|
||||||
numwidth = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->getRenderWidth("0");
|
int _lastnum = lastnum;
|
||||||
else if(lastnum<100)
|
while (_lastnum) {
|
||||||
numwidth = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->getRenderWidth("00");
|
numwidth += maxDigitWidth;
|
||||||
else if(lastnum<1000)
|
_lastnum /= 10;
|
||||||
numwidth = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->getRenderWidth("000");
|
}
|
||||||
else if(lastnum<10000)
|
|
||||||
numwidth = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->getRenderWidth("0000");
|
|
||||||
else // if(lastnum<100000)
|
|
||||||
numwidth = g_Font[SNeutrinoSettings::FONT_TYPE_CHANNELLIST_NUMBER]->getRenderWidth("00000");
|
|
||||||
|
|
||||||
frameBuffer->paintBoxRel(x, y+theight, width, height - theight - footerHeight, COL_MENUCONTENT_PLUS_0);
|
frameBuffer->paintBoxRel(x, y+theight, width, height - theight - footerHeight, COL_MENUCONTENT_PLUS_0);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user