timerlist: use CListHelpers

remove duplicated code and use CListHelpers::UpDownKey().
Some variable types had to be changed to avoid typecasts, as
a result (int) casts to foo.size() had to be added :-)
This commit is contained in:
Stefan Seyfried
2016-01-16 18:18:50 +01:00
committed by svenhoefer
parent edf7d48e04
commit ed7eaafbcb
3 changed files with 19 additions and 52 deletions

View File

@@ -36,6 +36,7 @@
#include <timerdclient/timerdtypes.h>
#include <gui/widget/menue.h>
#include <gui/widget/listhelpers.h>
#include <driver/framebuffer.h>
@@ -43,7 +44,7 @@
class CTimerdClient;
class CTimerList : public CMenuTarget
class CTimerList : public CMenuTarget, public CListHelpers
{
private:
CFrameBuffer *frameBuffer;
@@ -54,8 +55,8 @@ class CTimerList : public CMenuTarget
int fheight; // fontheight content
int theight; // fontheight titel
int footerHeight;
unsigned int selected;
unsigned int liststart;
int selected;
int liststart;
unsigned int listmaxshow;
bool visible;