gui/bedit/bouqueteditor: use Font::getMaxDigitWidth()

Origin commit data
------------------
Branch: ni/coolstream
Commit: 4dcc804a39
Author: martii <m4rtii@gmx.de>
Date: 2013-12-08 (Sun, 08 Dec 2013)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
martii
2013-12-08 10:36:22 +01:00
committed by vanhofen
parent edf9ea5112
commit e7b27fcbba

View File

@@ -139,16 +139,12 @@ void CBEChannelWidget::paint()
liststart = (selected/listmaxshow)*listmaxshow; liststart = (selected/listmaxshow)*listmaxshow;
int lastnum = liststart + listmaxshow; int lastnum = liststart + listmaxshow;
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");
for(unsigned int count=0;count<listmaxshow;count++) for(unsigned int count=0;count<listmaxshow;count++)
{ {