mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 00:11:14 +02:00
- timerlist: use CComponentsScrollbar
Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -1134,7 +1134,7 @@ void CTimerList::paintItem(int pos)
|
|||||||
int real_width=width;
|
int real_width=width;
|
||||||
if (timerlist.size() > listmaxshow)
|
if (timerlist.size() > listmaxshow)
|
||||||
{
|
{
|
||||||
real_width-=15; //scrollbar
|
real_width -= SCROLLBAR_WIDTH; //scrollbar
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int currpos = liststart + pos;
|
unsigned int currpos = liststart + pos;
|
||||||
@@ -1425,15 +1425,10 @@ void CTimerList::paint()
|
|||||||
|
|
||||||
if (timerlist.size()>listmaxshow)
|
if (timerlist.size()>listmaxshow)
|
||||||
{
|
{
|
||||||
int ypos = y+ theight;
|
int total_pages;
|
||||||
int sb = 2*fheight* listmaxshow;
|
int current_page;
|
||||||
frameBuffer->paintBoxRel(x+ width- 15,ypos, 15, sb, COL_SCROLLBAR_PLUS_0);
|
getScrollBarData(&total_pages, ¤t_page, timerlist.size(), listmaxshow, selected);
|
||||||
unsigned int tmp_max = listmaxshow;
|
paintScrollBar(x + width - SCROLLBAR_WIDTH, y + theight, SCROLLBAR_WIDTH, 2*fheight*listmaxshow, total_pages, current_page);
|
||||||
if (!tmp_max)
|
|
||||||
tmp_max = 1;
|
|
||||||
int sbc = ((timerlist.size()- 1)/ tmp_max)+ 1;
|
|
||||||
|
|
||||||
frameBuffer->paintBoxRel(x+ width- 13, ypos+ 2+ page_nr * (sb-4)/sbc, 11, (sb-4)/sbc, COL_SCROLLBAR_ACTIVE_PLUS_0, RADIUS_SMALL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
paintFoot();
|
paintFoot();
|
||||||
|
Reference in New Issue
Block a user