diff --git a/src/gui/bedit/bouqueteditor_bouquets.cpp b/src/gui/bedit/bouqueteditor_bouquets.cpp index b89218f4c..804ccea25 100644 --- a/src/gui/bedit/bouqueteditor_bouquets.cpp +++ b/src/gui/bedit/bouqueteditor_bouquets.cpp @@ -124,11 +124,11 @@ void CBEBouquetWidget::paint() if (sbc < 1) sbc = 1; - float sbh= (sb- 4)/ sbc; + int sbh = ((sb - 4) * 1024) / sbc; int sbs= (selected/listmaxshow); //scrollbar - frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ int(sbs* sbh) , 11, int(sbh), COL_MENUCONTENT_PLUS_3); + frameBuffer->paintBoxRel(x+width-13, ypos+2+(sbs*sbh)/1024, 11, sbh/1024, COL_MENUCONTENT_PLUS_3); } void CBEBouquetWidget::paintHead() diff --git a/src/gui/bookmarkmanager.cpp b/src/gui/bookmarkmanager.cpp index 56894699c..3a0ccb791 100644 --- a/src/gui/bookmarkmanager.cpp +++ b/src/gui/bookmarkmanager.cpp @@ -456,10 +456,9 @@ void CBookmarkManager::paint() int sbc= ((bookmarks.size()- 1)/ listmaxshow)+ 1; if (sbc < 1) sbc = 1; + int sbh = ((sb - 4) * 1024) / sbc; - float sbh= (sb- 4)/ sbc; - - frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ int(page_nr * sbh) , 11, int(sbh), COL_MENUCONTENT_PLUS_3); + frameBuffer->paintBoxRel(x+width-13, ypos+2+(page_nr*sbh)/1024, 11, sbh/1024, COL_MENUCONTENT_PLUS_3); } paintFoot(); diff --git a/src/gui/bouquetlist.cpp b/src/gui/bouquetlist.cpp index f8846cdf8..10150efaa 100644 --- a/src/gui/bouquetlist.cpp +++ b/src/gui/bouquetlist.cpp @@ -634,8 +634,8 @@ void CBouquetList::paint() frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1); int sbc= ((bsize - 1)/ listmaxshow)+ 1; /* bsize is > 0, so sbc is also > 0 */ - float sbh= (sb - 4)/ sbc; + int sbh = ((sb - 4) * 1024) / sbc; int sbs= (selected/listmaxshow); - frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ int(sbs* sbh) , 11, int(sbh), COL_MENUCONTENT_PLUS_3); + frameBuffer->paintBoxRel(x+width-13, ypos+2+(sbs*sbh)/1024, 11, sbh/1024, COL_MENUCONTENT_PLUS_3); } diff --git a/src/gui/eventlist.cpp b/src/gui/eventlist.cpp index 7c808e6ba..87e54015f 100644 --- a/src/gui/eventlist.cpp +++ b/src/gui/eventlist.cpp @@ -921,10 +921,10 @@ void CNeutrinoEventList::paint(t_channel_id channel_id) if (sbc < 1) sbc = 1; - float sbh= (sb- 4)/ sbc; + int sbh = ((sb - 4) * 1024) / sbc; int sbs= (selected/listmaxshow); - frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ int(sbs* sbh) , 11, int(sbh), COL_MENUCONTENT_PLUS_3); + frameBuffer->paintBoxRel(x+width-13, ypos+2+(sbs*sbh)/1024, 11, sbh/1024, COL_MENUCONTENT_PLUS_3); } diff --git a/src/gui/pictureviewer.cpp b/src/gui/pictureviewer.cpp index af95d92c4..ceb216b61 100644 --- a/src/gui/pictureviewer.cpp +++ b/src/gui/pictureviewer.cpp @@ -760,10 +760,10 @@ void CPictureViewerGui::paint() if (sbc < 1) sbc = 1; - float sbh= (sb- 4)/ sbc; + int sbh = ((sb - 4) * 1024) / sbc; int sbs= (selected/listmaxshow); - frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ int(sbs* sbh) , 11, int(sbh), COL_MENUCONTENT_PLUS_3); + frameBuffer->paintBoxRel(x+width-13, ypos+2+(sbs*sbh)/1024, 11, sbh/1024, COL_MENUCONTENT_PLUS_3); paintFoot(); paintInfo(); diff --git a/src/gui/timerlist.cpp b/src/gui/timerlist.cpp index 9dc613458..983c9d3c3 100644 --- a/src/gui/timerlist.cpp +++ b/src/gui/timerlist.cpp @@ -285,8 +285,8 @@ int CTimerList::exec(CMenuTarget* parent, const std::string & actionKey) if (timer_apids_dflt) timerlist[selected].apids = TIMERD_APIDS_CONF; else - timerlist[selected].apids = (timer_apids_std * TIMERD_APIDS_STD) | (timer_apids_ac3 * TIMERD_APIDS_AC3) | - (timer_apids_alt * TIMERD_APIDS_ALT); + timerlist[selected].apids = (unsigned char)((timer_apids_std * TIMERD_APIDS_STD) | (timer_apids_ac3 * TIMERD_APIDS_AC3) | + (timer_apids_alt * TIMERD_APIDS_ALT)); Timer->modifyTimerAPid(timerlist[selected].eventID,timerlist[selected].apids); Timer->modifyRecordTimerEvent(timerlist[selected].eventID, timerlist[selected].announceTime, timerlist[selected].alarmTime, @@ -917,9 +917,9 @@ void CTimerList::paint() frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1); int sbc= ((timerlist.size()- 1)/ listmaxshow)+ 1; - float sbh= (sb- 4)/ sbc; + int sbh = ((sb - 4) * 1024) / sbc; - frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ int(page_nr * sbh) , 11, int(sbh), COL_MENUCONTENT_PLUS_3, RADIUS_SMALL); + frameBuffer->paintBoxRel(x+width-13, ypos+2+(page_nr*sbh)/1024, 11, sbh/1024, COL_MENUCONTENT_PLUS_3, RADIUS_SMALL); } paintFoot();