neutrino: avoid float when calculating scrollbars

This commit is contained in:
Stefan Seyfried
2011-12-25 23:13:03 +01:00
parent 2d2cbf4001
commit 37c5f7c7d3
10 changed files with 11 additions and 21 deletions

View File

@@ -857,10 +857,9 @@ void EventList::paint(t_channel_id channel_id)
frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_MENUCONTENT_PLUS_1);
int sbc= ((evtlist.size()- 1)/ listmaxshow)+ 1;
float sbh= (sb- 4)/ 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 * (sb-4)/sbc, 11, (sb-4)/sbc, COL_MENUCONTENT_PLUS_3);
}